Driving state monitoring methods and apparatuses, driver monitoring systems, and vehicles

ABSTRACT

Embodiments of the present application disclose driving state monitoring methods and apparatuses, driver monitoring systems, and vehicles. The driving state monitoring method includes: performing driver state detection on a driver image; and performing at least one of: outputting a driving state monitoring result of a driver or performing intelligent driving control based on a result of the driver state detection. The embodiments of the present application can implement real-time monitoring of the driving state of a driver, so as to take corresponding measures in time when the driving state of the driver is poor, to ensure safe driving and avoid road traffic accidents.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. patent application Ser. No.16/177,198, filed on Oct. 31, 2018, and entitled “Driving StateMonitoring Methods and Apparatuses, Driver Monitoring Systems, andVehicles,” which is a continuation of PCT/CN 2018/084526, filed on Apr.25, 2018, and entitled “Driving State Monitoring Methods andApparatuses, Driver Monitoring Systems, and Vehicles,” which is acontinuation of PCT/CN 2017/096957, filed on Aug. 10, 2017. The contentsof each of the aforementioned patent applications are herebyincorporated by reference in their entirety.

The present application relates to computer vision technologies, and inparticular, to driving state monitoring methods and apparatuses, drivermonitoring systems, and vehicles.

BACKGROUND

A driver's driving state has very serious impact on safe driving, andtherefore, the driver should be in a good driving state as far aspossible. If the driver diverts attention to other things, such as amobile phone, during driving because of concerns about the other things,such as the mobile phone, the driver may not be able to learn about theroad situation in time.

A poor driving state of the driver may lead to a decline in judgmentability, or even mind wandering or transient memory loss, resulting inunsafe factors such as delayed or premature driving action, unscheduledoperation or improper correction time, and thus, road traffic accidentsare very likely to occur.

SUMMARY

Embodiments of the present application provide a technical solution ofdriving state monitoring.

A driving state monitoring method provided according to one aspect ofthe embodiments of the present application includes: performing driverstate detection on a driver image; and performing at least one of:outputting a driving state monitoring result of a driver or performingintelligent driving control based on a result of the driver statedetection.

Optionally, in the embodiments of the driving state monitoring method,the driver state detection includes at least one of: driver fatiguestate detection, driver distraction state detection, or driver scheduleddistraction action detection.

Optionally, in the embodiments of the driving state monitoring method,the performing driver fatigue state detection on a driver imageincludes: detecting at least part of a face region of the driver in thedriver image to obtain state information of the at least part of theface region, the state information of the at least part of the faceregion including at least one of: eye open/closed state information ormouth open/closed state information; obtaining a parameter value of anindex for representing a driver fatigue state based on the stateinformation of the at least part of the face region within a period oftime; and determining a result of the driver fatigue state detectionbased on the parameter value of the index for representing the driverfatigue state.

Optionally, in the embodiments of the driving state monitoring method,the index for representing the driver fatigue state includes at leastone of: an eye closure degree or a yawning degree.

Optionally, in the embodiments of the driving state monitoring method,the parameter value of the eye closure degree includes at least one of:a number of eye closures, an eye closure frequency, eye closureduration, eye closure amplitude, a number of eye semi-closures, or aneye semi-closure frequency; or the parameter value of the yawning degreeincludes at least one of: a yawning state, a number of yawns, yawningduration, or a yawning frequency.

Optionally, in the embodiments of the driving state monitoring method,the performing driver distraction state detection on a driver imageincludes: performing at least one of face orientation or gaze directiondetection on the driver in the driver image to obtain at least one offace orientation information or gaze direction information; determininga parameter value of an index for representing a driver distractionstate based on at least one of the face orientation information or thegaze direction information within a period of time, the index forrepresenting the driver distraction state includes at least one of: aface orientation deviation degree or a gaze deviation degree; anddetermining a result of the driver distraction state detection based onthe parameter value of the index for representing the driver distractionstate.

Optionally, in the embodiments of the driving state monitoring method,the parameter value of the face orientation deviation degree includes atleast one of: a number of head turns, head turning duration, or a headturning frequency; or the parameter value of the gaze deviation degreeincludes at least one of: a gaze direction deviation angle, gazedirection deviation duration, or a gaze direction deviation frequency.

Optionally, in the embodiments of the driving state monitoring method,the performing at least one of face orientation or gaze directiondetection on the driver image includes: detecting face key points of thedriver image; and performing at least one of face orientation or gazedirection detection based on the face key points.

Optionally, in the embodiments of the driving state monitoring method,the performing face orientation detection based on the face key pointsto obtain the face orientation information includes: obtaining featureinformation of head pose based on the face key points; and determiningthe face orientation information based on the feature information of thehead pose.

Optionally, in the embodiments of the driving state monitoring method,the obtaining feature information of head pose based on the face keypoints, and determining the face orientation information based on thefeature information of the head pose include: extracting the featureinformation of the head pose via a first neural network based on theface key points; and performing face orientation estimation via a secondneural network based on the feature information of the head pose toobtain the face orientation information.

Optionally, in the embodiments of the driving state monitoring method,the performing gaze direction detection based on the face key points toobtain the gaze direction information includes: determining a pupil edgelocation based on an eye image positioned by an eye key point among theface key points, and computing a pupil center location based on thepupil edge location; and computing the gaze direction information basedon the pupil center location and an eye center location.

Optionally, in the embodiments of the driving state monitoring method,the determining a pupil edge location based on an eye image positionedby an eye key point among the face key points includes: detecting, basedon a third neural network, a pupil edge location of an eye region imageamong images divided based on the face key points, and obtaining thepupil edge location based on information outputted by the third neuralnetwork.

Optionally, in the embodiments of the driving state monitoring method,the scheduled distraction action includes at least one of: a smokingaction, a drinking action, an eating action, a phone call action, or anentertainment action.

Optionally, in the embodiments of the driving state monitoring method,the performing scheduled distraction action detection on a driver imageincludes: performing target object detection corresponding to thescheduled distraction action on the driver image to obtain a detectionframe for a target object; and determining whether the scheduleddistraction action occurs based on the detection frame for the targetobject.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: if the distraction action occurs, obtaining adetermination result indicating whether the scheduled distraction actionoccurs within a period of time to obtain a parameter value of an indexfor representing a distraction degree; and determining the result of thedriver scheduled distraction action detection based on the parametervalue of the index for representing the distraction degree.

Optionally, in the embodiments of the driving state monitoring method,the parameter value of the distraction degree includes at least one of:a number of occurrences of the scheduled distraction action, duration ofthe scheduled distraction action, or a frequency of the scheduleddistraction action.

Optionally, in the embodiments of the driving state monitoring method,when the scheduled distraction action is the smoking action, theperforming target object detection corresponding to the scheduleddistraction action on the driver image to obtain a detection frame for atarget object, and the determining whether the scheduled distractionaction occurs based on the detection frame for the target objectinclude: performing face detection on the driver image via a fourthneural network to obtain a face detection frame, and extracting featureinformation of the face detection frame; and determining whether thesmoking action occurs via the fourth neural network based on the featureinformation of the face detection frame.

Optionally, in the embodiments of the driving state monitoring method,when the scheduled distraction action is the eating action/drinkingaction/phone call action/entertainment action, the performing targetobject detection corresponding to the scheduled distraction action onthe driver image to obtain a detection frame for a target object, andthe determining whether the scheduled distraction action occurs based onthe detection frame for the target object include: performing presettarget object detection corresponding to the eating action/drinkingaction/phone call action/entertainment action on the driver image via afifth neural network to obtain a detection frame for a preset targetobject; the preset target object including: hands, mouth, eyes, or atarget item; and the target item including at least one of followingtypes: containers, foods, or electronic devices; and determining adetection result of the distraction action based on the detection framefor the preset target object; the detection result of the distractionaction including one of: no eating action/drinking action/phone callaction/entertainment action occurs, the eating action occurs, thedrinking action occurs, the phone call action occurs, or theentertainment action occurs.

Optionally, in the embodiments of the driving state monitoring method,the determining a detection result of the distraction action based onthe detection frame for the preset target object includes: determiningthe detection result of the scheduled distraction action based onwhether a detection frame for the hands, a detection frame for themouth, a detection frame for the eyes, or a detection frame for thetarget item are detected, whether the detection frame for the handsoverlaps the detection frame for the target item, a type of the targetitem, and whether a distance between the detection frame for the targetitem and the detection frame for the mouth or the detection frame forthe eyes satisfies preset conditions.

Optionally, in the embodiments of the driving state monitoring method,the determining the detection result of the distraction action based onwhether the detection frame for the hands overlaps the detection framefor the target object, and whether a location relationship between thedetection frame for the target object and the detection frame for themouth or the detection frame for the eyes satisfies preset conditionsincludes: if the detection frame for the hands overlaps the detectionframe for the target item, the type of the target item is a container orfood, and the detection frame for the target item overlaps the detectionframe for the mouth, determining that the eating action or the drinkingaction occurs; or if the detection frame for the hands overlaps thedetection frame for the target item, the type of the target item is anelectronic device, and the minimum distance between the detection framefor the target item and the detection frame for the mouth is less than afirst preset distance, or the minimum distance between the detectionframe for the target item and the detection frame for the eyes is lessthan a second preset distance, determining that the entertainment actionor the phone call action occurs.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: if the detection frame for the hands, the detectionframe for the mouth, and the detection frame for any one target item arenot detected simultaneously, and the detection frame for the hands, thedetection frame for the eyes, and the detection frame for any one targetitem are not detected simultaneously, determining that the detectionresult of the distraction action is that no eating action, drinkingaction, phone call action and entertainment action is detected; or ifthe detection frame for the hands does not overlap the detection framefor the target item, determining that the detection result of thedistraction action is that no eating action, drinking action, phone callaction, and entertainment action is detected; or if the type of thetarget item is a container or food and the detection frame for thetarget item does not overlaps the detection frame for the mouth, or thetype of the target item is an electronic device and the minimum distancebetween the detection frame for the target item and the detection framefor the mouth is not less than the first preset distance, or the minimumdistance between the detection frame for the target item and thedetection frame for the eyes is not less than the second presetdistance, determining that the detection result of the distractionaction is that no eating action, drinking action, phone call action, andentertainment action is detected.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: if the result of the driver scheduled distractionaction detection is that a scheduled distraction action is detected,prompting the detected distraction action.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: outputting distraction prompt information based on atleast one of the result of the driver distraction state detection or theresult of the driver scheduled distraction action detection.

Optionally, in the embodiments of the driving state monitoring method,the outputting a driving state monitoring result of a driver based onthe result of the driver state detection includes: determining a drivingstate level according to a preset condition that the result of thedriver fatigue state detection, the result of the driver distractionstate detection, and the result of the driver scheduled distractionaction detection satisfy; and using the determined driving state levelas the driving state monitoring result.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: performing a control operation corresponding to thedriving state monitoring result.

Optionally, in the embodiments of the driving state monitoring method,the performing a control operation corresponding to the driving statemonitoring result includes at least one of: if the determined drivingstate monitoring result satisfies a predetermined prompting/warningcondition, outputting prompting/warning information corresponding to thepredetermined prompting/warning condition; or if the determined drivingstate monitoring result satisfies a predetermined driving mode switchingcondition, switching a driving mode to an automatic driving mode.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: performing facial recognition on the driver image; andperforming authentication control based on the result of the facialrecognition.

Optionally, in the embodiments of the driving state monitoring method,the performing facial recognition on the driver image includes:performing face detection on the driver image via a sixth neuralnetwork, and performing feature extraction on the detected face toobtain a face feature; performing face matching between the face featureand face feature templates in a database; and if a face feature templatematching the face feature exists in the database, outputting identityinformation corresponding to the face feature template matching the facefeature.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: if no face feature template matching the face featureexists in the database, prompting the driver to register; in response toreceiving a registration request from the driver, performing facedetection on the collected driver image via the sixth neural network,and performing feature extraction on the detected face to obtain a facefeature; and establishing user information of the driver in the databaseby using the face feature as the face feature template of the driver,the user information including the face feature template of the driverand the identity information inputted by the driver.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: storing the driving state monitoring result in theuser information of the driver in the database.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: performing image collection using an infrared camerato obtain the driver image.

Optionally, in the embodiments of the driving state monitoring method,the performing image collection using an infrared camera includes:performing image collection using the infrared camera deployed in atleast one location within a vehicle.

Optionally, in the embodiments of the driving state monitoring method,the at least one location includes at least one of the followinglocations: a location above or near a dashboard, a location above ornear a center console, an A-pillar or nearby location, or a rear-viewmirror or nearby location.

Optionally, in the embodiments, the driving state monitoring methodfurther includes: performing driver gesture detection based on thedriver image; and generating a control instruction based on a result ofthe driver gesture detection.

Optionally, in the embodiments of the driving state monitoring method,the performing driver gesture detection based on the driver imageincludes: detecting a hand key point in a driver image of a currentframe; and using a static gesture determined based on the detected handkey point as the result of the driver gesture detection.

Optionally, in the embodiments of the driving state monitoring method,the performing driver gesture detection based on the driver imageincludes: detecting hand key points of a plurality of driver imageframes in a driver video; and using a dynamic gesture determined basedon the detected hand key points of the plurality of driver image framesas the result of the driver gesture detection.

A driving state monitoring apparatus provided according to anotheraspect of the embodiments of the present application includes: a statedetection module, configured to perform driver state detection on adriver image; and at least one of: an output module, configured tooutput a driving state monitoring result of a driver based on a resultof the driver state detection, or an intelligent driving control module,configured to perform intelligent driving control based on the result ofthe driver state detection.

Optionally, in the embodiments of the driving state monitoringapparatus, the driver state detection includes at least one of: driverfatigue state detection, driver distraction state detection, or driverscheduled distraction action detection.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when performingdriver fatigue state detection on the driver image, to: detect at leastpart of a face region of the driver in the driver image to obtain stateinformation of the at least part of the face region, the stateinformation of the at least part of the face region including at leastone of: eye open/closed state information or mouth open/closed stateinformation; obtain a parameter value of an index for representing adriver fatigue state based on the state information of the at least partof the face region within a period of time; and determine a result ofthe driver fatigue state detection based on the parameter value of theindex for representing the driver fatigue state.

Optionally, in the embodiments of the driving state monitoringapparatus, the index for representing the driver fatigue state includesat least one of: an eye closure degree or a yawning degree.

Optionally, in the embodiments of the driving state monitoringapparatus, the parameter value of the eye closure degree includes atleast one of: a number of eye closures, an eye closure frequency, eyeclosure duration, eye closure amplitude, a number of eye semi-closures,or an eye semi-closure frequency; or the parameter value of the yawningdegree includes at least one of: a yawning state, a number of yawns,yawning duration, or a yawning frequency.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when performingdriver distraction state detection on the driver image, to: perform atleast one of face orientation or gaze direction detection on the driverin the driver image to obtain at least one of face orientationinformation or gaze direction information; determine a parameter valueof an index for representing a driver distraction state based on atleast one of the face orientation information or the gaze directioninformation within a period of time, the index for representing thedriver distraction state includes at least one of: a face orientationdeviation degree or a gaze deviation degree; and determine a result ofthe driver distraction state detection based on the parameter value ofthe index for representing the driver distraction state.

Optionally, in the embodiments of the driving state monitoringapparatus, the parameter value of the face orientation deviation degreeincludes at least one of: a number of head turns, head turning duration,or a head turning frequency; or the parameter value of the gazedeviation degree includes at least one of: a gaze direction deviationangle, gaze direction deviation duration, or a gaze direction deviationfrequency.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when performing atleast one of face orientation or gaze direction detection on the driverimage, to: detect face key points of the driver image; and perform atleast one of face orientation or gaze direction detection based on theface key points.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when performingface orientation detection based on the face key points, to: obtainfeature information of head pose based on the face key points; anddetermine the face orientation information based on the featureinformation of the head pose.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when obtaining thefeature information of the head pose based on the face key points anddetermining the face orientation information based on the featureinformation of the head pose, to: extract the feature information of thehead pose via a first neural network based on the face key points; andperform face orientation estimation via a second neural network based onthe feature information of the head pose to obtain the face orientationinformation.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when performinggaze direction detection based on the face key points, to: determine apupil edge location based on an eye image positioned by an eye key pointamong the face key points, and compute a pupil center location based onthe pupil edge location; and compute the gaze direction informationbased on the pupil center location and an eye center location.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when determiningthe pupil edge location based on the eye image positioned by the eye keypoint among the face key points, to: detect, based on a third neuralnetwork, a pupil edge location of an eye region image among imagesdivided based on the face key points, and obtain the pupil edge locationbased on information outputted by the third neural network.

Optionally, in the embodiments of the driving state monitoringapparatus, the scheduled distraction action includes at least one of: asmoking action, a drinking action, an eating action, a phone callaction, or an entertainment action.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when performingscheduled distraction action detection on the driver image, to: performtarget object detection corresponding to the scheduled distractionaction on the driver image to obtain a detection frame for a targetobject; and determine whether the scheduled distraction action occursbased on the detection frame for the target object.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is further configured to: if thescheduled distraction action occurs, obtain a determination resultindicating whether the scheduled distraction action occurs within aperiod of time, and obtain the parameter value of the index forrepresenting the distraction degree; and determine the result of thedriver scheduled distraction action detection based on the parametervalue of the index for representing the distraction degree.

Optionally, in the embodiments of the driving state monitoringapparatus, the parameter value of the distraction degree includes atleast one of: a number of occurrences of the scheduled distractionaction, duration of the scheduled distraction action, or a frequency ofthe scheduled distraction action.

Optionally, in the embodiments of the driving state monitoringapparatus, when the scheduled distraction action is the smoking action,the state detection module is configured, when performing scheduleddistraction action detection on the driver image, to: perform facedetection on the driver image via a fourth neural network to obtain aface detection frame, and extract feature information of the facedetection frame; and determine whether the smoking action occurs via thefourth neural network based on the feature information of the facedetection frame.

Optionally, in the embodiments of the driving state monitoringapparatus, when the scheduled distraction action is the eatingaction/drinking action/phone call action/entertainment action, the statedetection module is configured, when performing scheduled distractionaction on the driver image, to: perform preset target object detectioncorresponding to the eating action/drinking action/phone callaction/entertainment action on the driver image via a fifth neuralnetwork to obtain a detection frame for a preset target object; thepreset target object including: hands, mouth, eyes, or a target item;and the target item including at least one of following types:containers, foods, or electronic devices; and determining a detectionresult of the distraction action based on the detection frame for thepreset target object; the detection result of the distraction actionincluding one of: no eating action/drinking action/phone callaction/entertainment action occurs, the eating action occurs, thedrinking action occurs, the phone call action occurs, or theentertainment action occurs.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when determiningthe detection result of the distraction action based on the detectionframe for the preset target object, to: determine the detection resultof the scheduled distraction action based on whether a detection framefor the hands, a detection frame for the mouth, a detection frame forthe eyes, and a detection frame for the target item are detected,whether the detection frame for the hands overlaps the detection framefor the target item, a type of the target item, and whether a distancebetween the detection frame for the target item and the detection framefor the mouth or the detection frame for the eyes satisfies presetconditions.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is configured, when determiningthe detection result of the distraction action based on whether thedetection frame for the hands overlaps the detection frame for thetarget item, and whether a location relationship between the detectionframe for the target item and the detection frame for the mouth or thedetection frame for the eyes satisfies preset conditions, to: if thedetection frame for the hands overlaps the detection frame for thetarget item, the type of the target item is a container or food, and thedetection frame for the target item overlaps the detection frame for themouth, determine that the eating action or the drinking action occurs;or if the detection frame for the hands overlaps the detection frame forthe target item, the type of the target item is an electronic device,and the minimum distance between the detection frame for the target itemand the detection frame for the mouth is less than a first presetdistance, or the minimum distance between the detection frame for thetarget item and the detection frame for the eyes is less than a secondpreset distance, determine that the entertainment action or the phonecall action occurs.

Optionally, in the embodiments of the driving state monitoringapparatus, the state detection module is further configured to: if thedetection frame for the hands, the detection frame for the mouth, andthe detection frame for any one target item are not detectedsimultaneously, and the detection frame for the hands, the detectionframe for the eyes, and the detection frame for any one target item arenot detected simultaneously, determine that the detection result of thedistraction action is that no eating action, drinking action, phone callaction and entertainment action is detected; or if the detection framefor the hands does not overlap the detection frame for the target item,determine that the detection result of the distraction action is that noeating action, drinking action, phone call action, and entertainmentaction is detected; or if the type of the target item is a container orfood and the detection frame for the target item does not overlaps thedetection frame for the mouth, or the type of the target item is anelectronic device and the minimum distance between the detection framefor the target item and the detection frame for the mouth is not lessthan the first preset distance, or the minimum distance between thedetection frame for the target item and the detection frame for the eyesis not less than the second preset distance, determine that thedetection result of the distraction action is that no eating action,drinking action, phone call action, and entertainment action isdetected.

Optionally, in the embodiments, the driving state monitoring apparatusfurther includes: a first prompting module, configured to prompt, if theresult of the driver scheduled distraction action detection is that ascheduled distraction action is detected, the detected distractionaction.

Optionally, in the embodiments, the driving state monitoring apparatusfurther includes: a second prompting module, configured to outputdistraction prompt information based on at least one of the result ofthe driver distraction state detection or the result of the driverscheduled distraction action detection.

Optionally, in the embodiments of the driving state monitoringapparatus, the output module is configured, when outputting the drivingstate monitoring result of the driver based on the result of the driverstate detection, to: determine a driving state level according to apreset condition that the result of the driver fatigue state detection,the result of the driver distraction state detection, and the result ofthe driver scheduled distraction action detection satisfy; and use thedetermined driving state level as the driving state monitoring result.

Optionally, in the embodiments, the driving state monitoring apparatusfurther includes: a first control module, configured to perform acontrol operation corresponding to the driving state monitoring result.

Optionally, in the embodiments of the driving state monitoringapparatus, the first control module is configured to: if the determineddriving state monitoring result satisfies a predeterminedprompting/warning condition, output prompting/warning informationcorresponding to the predetermined prompting/warning condition; or ifthe determined driving state monitoring result satisfies a predetermineddriving mode switching condition, switch a driving mode to an automaticdriving mode.

Optionally, in the embodiments, the driving state monitoring apparatusfurther includes: a facial recognition module, configured to performfacial recognition on the driver image; and a second control module,configured to perform authentication control based on a result of thefacial recognition.

Optionally, in the embodiments of the driving state monitoringapparatus, the facial recognition module is configured to: perform facedetection on the driver image via a sixth neural network, and performfeature extraction on the detected face to obtain a face feature;perform face matching between the face feature and face featuretemplates in a database; and if a face feature template matching theface feature exists in the database, output identity informationcorresponding to the face feature template corresponding to the facefeature.

Optionally, in the embodiments of the driving state monitoringapparatus, the second control module is further configured to: if noface feature template matching the face feature exists in the database,prompt the driver to register; and establish user information of thedriver in the database by using the face feature sent by the facialrecognition module as the face feature template of the driver, the userinformation including the face feature template of the driver and theidentity information inputted by the driver; the facial recognitionmodule is further configured to, in response to receiving a registrationrequest from the driver, perform face detection on the collected driverimage via the sixth neural network, perform feature extraction on thedetected face to obtain the face feature, and send the face feature tothe second control module.

Optionally, in the embodiments of the driving state monitoringapparatus, the output module is further configured to store the drivingstate monitoring result in the user information of the driver in thedatabase.

Optionally, in the embodiments, the driving state monitoring apparatusfurther includes: at least one infrared camera, correspondingly deployedin at least one location within a vehicle, and configured to performimage collection to obtain the driver image.

Optionally, in the embodiments of the driving state monitoringapparatus, the at least one location includes at least one of thefollowing locations: a location above or near a dashboard, a locationabove or near a center console, an A-pillar or nearby location, or arear-view mirror or nearby location.

Optionally, in the embodiments, the driving state monitoring apparatusfurther includes: a gesture detection module, configured to performdriver gesture detection based on the driver image; and an instructiongeneration module, configured to generate a control instruction based ona result of the driver gesture detection.

Optionally, in the embodiments of the driving state monitoringapparatus, the gesture detection module is configured to: detect a handkey point in a driver image of a current frame; and use a static gesturedetermined based on the detected hand key point as the result of thedriver gesture detection.

Optionally, in the embodiments of the driving state monitoringapparatus, the gesture detection module is configured to: detect handkey points of a plurality of driver image frames in a driver video; anduse a dynamic gesture determined based on the detected hand key pointsof the plurality of driver image frames as the result of the drivergesture detection.

A driver monitoring system provided according to still another aspect ofthe embodiments of the present application includes: a display module,configured to display a driver image and a driving state monitoringresult of a driver; and a driver state detection module, configured toperform driver state detection on the driver image, and output thedriving state monitoring result of the driver based on a result of thedriver state detection; the driver state detection including at leastone of: driver fatigue state detection, driver distraction statedetection, or driver scheduled distraction action detection.

Optionally, in the embodiments of the driver monitoring system, thedisplay module includes: a first display region, configured to displaythe driver image and prompting/warning information corresponding to thedriving state monitoring result; and a second display region, configuredto display a scheduled distraction action.

Optionally, in the embodiments of the driver monitoring system, thedriver state detection module is further configured to perform facialrecognition on the driver image; the first display region is furtherconfigured to display a result of the facial recognition.

Optionally, in the embodiments of the driver monitoring system, thedriver state detection module is further configured to perform drivergesture detection based on the driver image; the display module furtherincludes: a third display region, configured to display a result of thegesture detection, the result of the gesture detection including astatic gesture or a dynamic gesture.

An electronic device provided according to yet another aspect of theembodiments of the present application includes: a memory, configured tostore a computer program; and a processor, configured to execute thecompute program stored in the memory, and implement the driving statemonitoring method according to any of the foregoing embodiments of thepresent application when the computer program is executed.

A computer readable storage medium provided according to yet anotheraspect of the embodiments of the present application has a computerprogram stored thereon, where when the computer program is executed by aprocessor, the driving state monitoring method according to any of theforegoing embodiments of the present application is implemented.

A computer program provided according to yet another aspect of theembodiments of the present application includes computer instructions,where when the computer instructions run in a processor of a device, thedriving state monitoring method according to any of the foregoingembodiments of the present application is implemented

A vehicle provided according to yet another aspect of the embodiments ofthe present application includes a central control system, and furtherincludes: the driving state monitoring apparatus according to any of theforegoing embodiments of the present application, or the drivermonitoring system according to any of the foregoing embodiments of thepresent application.

Optionally, in the embodiments of the vehicle, the central controlsystem is configured to: perform intelligent driving control based onthe result of driver state detection outputted by the driving statemonitoring apparatus or the driver monitoring system; or switch adriving mode to an automatic driving mode when the driving statemonitoring result outputted by the driving state monitoring apparatus orthe driver monitoring system satisfies a predetermined driving modeswitching condition, and perform automatic driving control on thevehicle in the automatic driving mode; or invoke, when the driving statemonitoring result satisfies the preset predetermined prompting/warningcondition, an entertainment system in the vehicle or an entertainmentsystem external to the vehicle to output prompting/warning informationcorresponding to the predetermined prompting/warning condition.

Optionally, in the embodiments of the vehicle, the central controlsystem is further configured to correspondingly control the vehiclebased on a control instruction generated based on the result of thegesture detection outputted by the driving state monitoring apparatus orthe driver monitoring system.

Optionally, in the embodiments of the vehicle, the central controlsystem is further configured to switch the driving mode to a manualdriving mode when a driving instruction for switching to manual drivingis received.

Optionally, in the embodiments, the vehicle further includes: anentertainment system, configured to output the prompting/warninginformation corresponding to the predetermined prompting/warningcondition according to the control instruction of the central controlsystem; or adjust the pre-warning effect of the prompting/warninginformation or the playing effect of entertainment according to thecontrol instruction of the central control system.

Optionally, in the embodiments, the vehicle further includes: at leastone infrared camera, configured to perform image collection.

Optionally, in the embodiments of the vehicle, the infrared camera isdeployed in at least one location within the vehicle, and the at leastone location includes at least one of the following locations: alocation above or near a dashboard, a location above or near a centerconsole, an A-pillar or nearby location, or a rear-view mirror or nearbylocation.

In yet another aspect, disclosed is a driving state monitoringapparatus, comprising: a processor; and a memory storing instructions,the instructions when executed by the processor, cause the processor toperform operations, the operations comprising: performing driver statedetection on a driver image; and performing at least one of: outputtinga driving state monitoring result of a driver based on a result of thedriver state detection or performing intelligent driving control basedon the result of the driver state detection; wherein the driver statedetection comprises at least one of: driver fatigue state detection,driver distraction state detection, or driver scheduled distractionaction detection.

In one embodiment, the performing driver fatigue state detection on adriver image includes: detecting at least part of a face region of thedriver in the driver image to obtain state information of the at leastpart of the face region, the state information of the at least part ofthe face region comprising at least one of: eye open/closed stateinformation or mouth open/closed state information; obtaining aparameter value of an index for representing a driver fatigue statebased on the state information of the at least part of the face regionwithin a period of time; and determining a result of the driver fatiguestate detection based on the parameter value of the index forrepresenting the driver fatigue state.

In one embodiment, the index for representing the driver fatigue stateincludes at least one of: an eye closure degree or a yawning degree.

In one embodiment, the parameter value of the eye closure degreeincludes at least one of: a number of eye closures, an eye closurefrequency, eye closure duration, eye closure amplitude, a number of eyesemi-closures, or an eye semi-closure frequency; or the parameter valueof the yawning degree comprises at least one of: a yawning state, anumber of yawns, yawning duration, or a yawning frequency.

In one embodiment, the performing driver distraction state detection ona driver image includes: performing at least one of face orientation orgaze direction detection on the driver in the driver image to obtain atleast one of face orientation information or gaze direction information;determining a parameter value of an index for representing a driverdistraction state based on at least one of the face orientationinformation or the gaze direction information within a period of time,the index for representing the driver distraction state includes atleast one of: a face orientation deviation degree or a gaze deviationdegree; and determining a result of the driver distraction statedetection based on the parameter value of the index for representing thedriver distraction state.

In one embodiment, the parameter value of the face orientation deviationdegree includes at least one of: a number of head turns, head turningduration, or a head turning frequency; or the parameter value of thegaze deviation degree includes at least one of: a gaze directiondeviation angle, gaze direction deviation duration, or a gaze directiondeviation frequency.

In one embodiment, the performing at least one of face orientation orgaze direction detection on the driver image includes: detecting facekey points of the driver image; and performing at least one of faceorientation or gaze direction detection based on the face key points.

In one embodiment, the performing face orientation detection based onthe face key points to obtain the face orientation information includes:obtaining feature information of head pose based on the face key points;and determining the face orientation information based on the featureinformation of the head pose.

In one embodiment, the obtaining feature information of head pose basedon the face key points, and determining the face orientation informationbased on the feature information of the head pose include: extractingthe feature information of the head pose via a first neural networkbased on the face key points; and performing face orientation estimationvia a second neural network based on the feature information of the headpose to obtain the face orientation information.

In one embodiment, the performing gaze direction detection based on theface key points to obtain the gaze direction information includes:determining a pupil edge location based on an eye image positioned by aneye key point among the face key points, and computing a pupil centerlocation based on the pupil edge location; and computing the gazedirection information based on the pupil center location and an eyecenter location.

In one embodiment, the determining a pupil edge location based on an eyeimage positioned by an eye key point among the face key points includes:detecting, based on a third neural network, a pupil edge location of aneye region image among images divided based on the face key points, andobtaining the pupil edge location based on information outputted by thethird neural network.

In one embodiment, the scheduled distraction action includes at leastone of: a smoking action, a drinking action, an eating action, a phonecall action, or an entertainment action.

In one embodiment, the performing scheduled distraction action detectionon a driver image includes: performing target object detectioncorresponding to the scheduled distraction action on the driver image toobtain a detection frame for a target object; and determining whetherthe scheduled distraction action occurs based on the detection frame forthe target object.

In one embodiment, the operations further include: if the distractionaction occurs, obtaining a determination result indicating whether thescheduled distraction action occurs within a period of time to obtain aparameter value of an index for representing a distraction degree; anddetermining the result of the driver scheduled distraction actiondetection based on the parameter value of the index for representing thedistraction degree.

In one embodiment, the parameter value of the distraction degreeincludes at least one of: a number of occurrences of the scheduleddistraction action, duration of the scheduled distraction action, or afrequency of the scheduled distraction action.

In one embodiment, when the scheduled distraction action is the smokingaction, the performing target object detection corresponding to thescheduled distraction action on the driver image to obtain a detectionframe for a target object, and the determining whether the scheduleddistraction action occurs based on the detection frame for the targetobject include: performing face detection on the driver image via afourth neural network to obtain a face detection frame, and extractingfeature information of the face detection frame; and determining whetherthe smoking action occurs via the fourth neural network based on thefeature information of the face detection frame.

In one embodiment, when the scheduled distraction action is the eatingaction/drinking action/phone call action/entertainment action, theperforming target object detection corresponding to the scheduleddistraction action on the driver image to obtain a detection frame for atarget object, and the determining whether the scheduled distractionaction occurs based on the detection frame for the target objectinclude: performing preset target object detection corresponding to theeating action/drinking action/phone call action/entertainment action onthe driver image via a fifth neural network to obtain a detection framefor a preset target object; the preset target object including: hands,mouth, eyes, or a target item; and the target item including at leastone of following types: containers, foods, or electronic devices; anddetermining a detection result of the distraction action based on thedetection frame for the preset target object; the detection result ofthe distraction action including one of: no eating action/drinkingaction/phone call action/entertainment action occurs, the eating actionoccurs, the drinking action occurs, the phone call action occurs, or theentertainment action occurs.

In one embodiment, the determining a detection result of the distractionaction based on the detection frame for the preset target objectincludes: determining the detection result of the scheduled distractionaction based on whether a detection frame for the hands, a detectionframe for the mouth, a detection frame for the eyes, or a detectionframe for the target item are detected, whether the detection frame forthe hands overlaps the detection frame for the target item, a type ofthe target item, and whether a distance between the detection frame forthe target item and the detection frame for the mouth or the detectionframe for the eyes satisfies preset conditions.

In one embodiment, the determining the detection result of thedistraction action based on whether the detection frame for the handsoverlaps the detection frame for the target object, and whether alocation relationship between the detection frame for the target objectand the detection frame for the mouth or the detection frame for theeyes satisfies preset conditions includes: if the detection frame forthe hands overlaps the detection frame for the target item, the type ofthe target item is a container or food, and the detection frame for thetarget item overlaps the detection frame for the mouth, determining thatthe eating action or the drinking action occurs; or if the detectionframe for the hands overlaps the detection frame for the target item,the type of the target item is an electronic device, and the minimumdistance between the detection frame for the target item and thedetection frame for the mouth is less than a first preset distance, orthe minimum distance between the detection frame for the target item andthe detection frame for the eyes is less than a second preset distance,determining that the entertainment action or the phone call actionoccurs.

In one embodiment, the operations further include: if the detectionframe for the hands, the detection frame for the mouth, and thedetection frame for any one target item are not detected simultaneously,and the detection frame for the hands, the detection frame for the eyes,and the detection frame for any one target item are not detectedsimultaneously, determining that the detection result of the distractionaction is that no eating action, drinking action, phone call action andentertainment action is detected; or if the detection frame for thehands does not overlap the detection frame for the target item,determining that the detection result of the distraction action is thatno eating action, drinking action, phone call action, and entertainmentaction is detected; or if the type of the target item is a container orfood and the detection frame for the target item does not overlaps thedetection frame for the mouth, or the type of the target item is anelectronic device and the minimum distance between the detection framefor the target item and the detection frame for the mouth is not lessthan the first preset distance, or the minimum distance between thedetection frame for the target item and the detection frame for the eyesis not less than the second preset distance, determining that thedetection result of the distraction action is that no eating action,drinking action, phone call action, and entertainment action isdetected.

In one embodiment, the operations further include: if the result of thedriver scheduled distraction action detection is that a scheduleddistraction action is detected, prompting the detected distractionaction.

In one embodiment, the operations further include: outputtingdistraction prompt information based on at least one of the result ofthe driver distraction state detection or the result of the driverscheduled distraction action detection.

In one embodiment, the outputting a driving state monitoring result of adriver based on the result of the driver state detection includes:determining a driving state level according to a preset condition thatthe result of the driver fatigue state detection, the result of thedriver distraction state detection, and the result of the driverscheduled distraction action detection satisfy; and using the determineddriving state level as the driving state monitoring result.

In one embodiment, the operations further include: performing a controloperation corresponding to the driving state monitoring result.

In one embodiment, the performing a control operation corresponding tothe driving state monitoring result includes at least one of: if thedetermined driving state monitoring result satisfies a predeterminedprompting/warning condition, outputting prompting/warning informationcorresponding to the predetermined prompting/warning condition; or ifthe determined driving state monitoring result satisfies a predetermineddriving mode switching condition, switching a driving mode to anautomatic driving mode.

In one embodiment, the operations further include: performing facialrecognition on the driver image; and performing authentication controlbased on the result of the facial recognition.

In one embodiment, the performing facial recognition on the driver imageincludes: performing face detection on the driver image via a sixthneural network, and performing feature extraction on the detected faceto obtain a face feature; performing face matching between the facefeature and face feature templates in a database; and if a face featuretemplate matching the face feature exists in the database, outputtingidentity information corresponding to the face feature template matchingthe face feature.

In one embodiment, the operations further include: if no face featuretemplate matching the face feature exists in the database, prompting thedriver to register; in response to receiving a registration request fromthe driver, performing face detection on the collected driver image viathe sixth neural network, and performing feature extraction on thedetected face to obtain a face feature; and establishing userinformation of the driver in the database by using the face feature asthe face feature template of the driver, the user information includingthe face feature template of the driver and the identity informationinputted by the driver.

In one embodiment, the operations further include: storing the drivingstate monitoring result in the user information of the driver in thedatabase.

In one embodiment, the operations further include: performing imagecollection using an infrared camera to obtain the driver image.

In one embodiment, the performing image collection using an infraredcamera includes: performing image collection using the infrared cameradeployed in at least one location within a vehicle.

In one embodiment, the at least one location includes at least one ofthe following locations: a location above or near a dashboard, alocation above or near a center console, an A-pillar or nearby location,or a rear-view mirror or nearby location.

In one embodiment, the operations further include: performing drivergesture detection based on the driver image; and generating a controlinstruction based on a result of the driver gesture detection.

In one embodiment, the performing driver gesture detection based on thedriver image includes: detecting a hand key point in a driver image of acurrent frame; and using a static gesture determined based on thedetected hand key point as the result of the driver gesture detection.

In one embodiment, the performing driver gesture detection based on thedriver image includes: detecting hand key points of a plurality ofdriver image frames in a driver video; and using a dynamic gesturedetermined based on the detected hand key points of the plurality ofdriver image frames as the result of the driver gesture detection.

In yet another aspect, disclosed is a non-transitory computer readablestorage medium having a computer program stored thereon, wherein thecomputer program when executed by a processor, causes the processor toperform operations, the operations comprising: performing driver statedetection on a driver image; and performing at least one of: outputtinga driving state monitoring result of a driver based on a result of thedriver state detection or performing intelligent driving control basedon the result of the driver state detection; wherein the driver statedetection comprises at least one of: driver fatigue state detection,driver distraction state detection, or driver scheduled distractionaction detection.

In one embodiment, the performing driver fatigue state detection on adriver image includes: detecting at least part of a face region of thedriver in the driver image to obtain state information of the at leastpart of the face region, the state information of the at least part ofthe face region comprising at least one of: eye open/closed stateinformation or mouth open/closed state information; obtaining aparameter value of an index for representing a driver fatigue statebased on the state information of the at least part of the face regionwithin a period of time; and determining a result of the driver fatiguestate detection based on the parameter value of the index forrepresenting the driver fatigue state.

In one embodiment, the index for representing the driver fatigue stateincludes at least one of: an eye closure degree or a yawning degree.

In one embodiment, the parameter value of the eye closure degreeincludes at least one of: a number of eye closures, an eye closurefrequency, eye closure duration, eye closure amplitude, a number of eyesemi-closures, or an eye semi-closure frequency; or the parameter valueof the yawning degree comprises at least one of: a yawning state, anumber of yawns, yawning duration, or a yawning frequency.

In one embodiment, the performing driver distraction state detection ona driver image includes: performing at least one of face orientation orgaze direction detection on the driver in the driver image to obtain atleast one of face orientation information or gaze direction information;determining a parameter value of an index for representing a driverdistraction state based on at least one of the face orientationinformation or the gaze direction information within a period of time,the index for representing the driver distraction state includes atleast one of: a face orientation deviation degree or a gaze deviationdegree; and determining a result of the driver distraction statedetection based on the parameter value of the index for representing thedriver distraction state.

In one embodiment, the parameter value of the face orientation deviationdegree includes at least one of: a number of head turns, head turningduration, or a head turning frequency; or the parameter value of thegaze deviation degree includes at least one of: a gaze directiondeviation angle, gaze direction deviation duration, or a gaze directiondeviation frequency.

In one embodiment, the performing at least one of face orientation orgaze direction detection on the driver image includes: detecting facekey points of the driver image; and performing at least one of faceorientation or gaze direction detection based on the face key points.

In one embodiment, the performing face orientation detection based onthe face key points to obtain the face orientation information includes:obtaining feature information of head pose based on the face key points;and determining the face orientation information based on the featureinformation of the head pose.

In one embodiment, the obtaining feature information of head pose basedon the face key points, and determining the face orientation informationbased on the feature information of the head pose include: extractingthe feature information of the head pose via a first neural networkbased on the face key points; and performing face orientation estimationvia a second neural network based on the feature information of the headpose to obtain the face orientation information.

In one embodiment, the performing gaze direction detection based on theface key points to obtain the gaze direction information includes:determining a pupil edge location based on an eye image positioned by aneye key point among the face key points, and computing a pupil centerlocation based on the pupil edge location; and computing the gazedirection information based on the pupil center location and an eyecenter location.

In one embodiment, the determining a pupil edge location based on an eyeimage positioned by an eye key point among the face key points includes:detecting, based on a third neural network, a pupil edge location of aneye region image among images divided based on the face key points, andobtaining the pupil edge location based on information outputted by thethird neural network.

In one embodiment, the scheduled distraction action includes at leastone of: a smoking action, a drinking action, an eating action, a phonecall action, or an entertainment action.

In one embodiment, the performing scheduled distraction action detectionon a driver image includes: performing target object detectioncorresponding to the scheduled distraction action on the driver image toobtain a detection frame for a target object; and determining whetherthe scheduled distraction action occurs based on the detection frame forthe target object.

In one embodiment, the operations further include: if the distractionaction occurs, obtaining a determination result indicating whether thescheduled distraction action occurs within a period of time to obtain aparameter value of an index for representing a distraction degree; anddetermining the result of the driver scheduled distraction actiondetection based on the parameter value of the index for representing thedistraction degree.

In one embodiment, the parameter value of the distraction degreeincludes at least one of: a number of occurrences of the scheduleddistraction action, duration of the scheduled distraction action, or afrequency of the scheduled distraction action.

In one embodiment, when the scheduled distraction action is the smokingaction, the performing target object detection corresponding to thescheduled distraction action on the driver image to obtain a detectionframe for a target object, and the determining whether the scheduleddistraction action occurs based on the detection frame for the targetobject include: performing face detection on the driver image via afourth neural network to obtain a face detection frame, and extractingfeature information of the face detection frame; and determining whetherthe smoking action occurs via the fourth neural network based on thefeature information of the face detection frame.

In one embodiment, when the scheduled distraction action is the eatingaction/drinking action/phone call action/entertainment action, theperforming target object detection corresponding to the scheduleddistraction action on the driver image to obtain a detection frame for atarget object, and the determining whether the scheduled distractionaction occurs based on the detection frame for the target objectinclude: performing preset target object detection corresponding to theeating action/drinking action/phone call action/entertainment action onthe driver image via a fifth neural network to obtain a detection framefor a preset target object; the preset target object including: hands,mouth, eyes, or a target item; and the target item including at leastone of following types: containers, foods, or electronic devices; anddetermining a detection result of the distraction action based on thedetection frame for the preset target object; the detection result ofthe distraction action including one of: no eating action/drinkingaction/phone call action/entertainment action occurs, the eating actionoccurs, the drinking action occurs, the phone call action occurs, or theentertainment action occurs.

In one embodiment, the determining a detection result of the distractionaction based on the detection frame for the preset target objectincludes: determining the detection result of the scheduled distractionaction based on whether a detection frame for the hands, a detectionframe for the mouth, a detection frame for the eyes, or a detectionframe for the target item are detected, whether the detection frame forthe hands overlaps the detection frame for the target item, a type ofthe target item, and whether a distance between the detection frame forthe target item and the detection frame for the mouth or the detectionframe for the eyes satisfies preset conditions.

In one embodiment, the determining the detection result of thedistraction action based on whether the detection frame for the handsoverlaps the detection frame for the target object, and whether alocation relationship between the detection frame for the target objectand the detection frame for the mouth or the detection frame for theeyes satisfies preset conditions includes: if the detection frame forthe hands overlaps the detection frame for the target item, the type ofthe target item is a container or food, and the detection frame for thetarget item overlaps the detection frame for the mouth, determining thatthe eating action or the drinking action occurs; or if the detectionframe for the hands overlaps the detection frame for the target item,the type of the target item is an electronic device, and the minimumdistance between the detection frame for the target item and thedetection frame for the mouth is less than a first preset distance, orthe minimum distance between the detection frame for the target item andthe detection frame for the eyes is less than a second preset distance,determining that the entertainment action or the phone call actionoccurs.

In one embodiment, the operations further include: if the detectionframe for the hands, the detection frame for the mouth, and thedetection frame for any one target item are not detected simultaneously,and the detection frame for the hands, the detection frame for the eyes,and the detection frame for any one target item are not detectedsimultaneously, determining that the detection result of the distractionaction is that no eating action, drinking action, phone call action andentertainment action is detected; or if the detection frame for thehands does not overlap the detection frame for the target item,determining that the detection result of the distraction action is thatno eating action, drinking action, phone call action, and entertainmentaction is detected; or if the type of the target item is a container orfood and the detection frame for the target item does not overlaps thedetection frame for the mouth, or the type of the target item is anelectronic device and the minimum distance between the detection framefor the target item and the detection frame for the mouth is not lessthan the first preset distance, or the minimum distance between thedetection frame for the target item and the detection frame for the eyesis not less than the second preset distance, determining that thedetection result of the distraction action is that no eating action,drinking action, phone call action, and entertainment action isdetected.

In one embodiment, the operations further include: if the result of thedriver scheduled distraction action detection is that a scheduleddistraction action is detected, prompting the detected distractionaction.

In one embodiment, the operations further include: outputtingdistraction prompt information based on at least one of the result ofthe driver distraction state detection or the result of the driverscheduled distraction action detection.

In one embodiment, the outputting a driving state monitoring result of adriver based on the result of the driver state detection includes:determining a driving state level according to a preset condition thatthe result of the driver fatigue state detection, the result of thedriver distraction state detection, and the result of the driverscheduled distraction action detection satisfy; and using the determineddriving state level as the driving state monitoring result.

In one embodiment, the operations further include: performing a controloperation corresponding to the driving state monitoring result.

In one embodiment, the performing a control operation corresponding tothe driving state monitoring result includes at least one of: if thedetermined driving state monitoring result satisfies a predeterminedprompting/warning condition, outputting prompting/warning informationcorresponding to the predetermined prompting/warning condition; or ifthe determined driving state monitoring result satisfies a predetermineddriving mode switching condition, switching a driving mode to anautomatic driving mode.

In one embodiment, the operations further include: performing facialrecognition on the driver image; and performing authentication controlbased on the result of the facial recognition.

In one embodiment, the performing facial recognition on the driver imageincludes: performing face detection on the driver image via a sixthneural network, and performing feature extraction on the detected faceto obtain a face feature; performing face matching between the facefeature and face feature templates in a database; and if a face featuretemplate matching the face feature exists in the database, outputtingidentity information corresponding to the face feature template matchingthe face feature.

In one embodiment, the operations further include: if no face featuretemplate matching the face feature exists in the database, prompting thedriver to register; in response to receiving a registration request fromthe driver, performing face detection on the collected driver image viathe sixth neural network, and performing feature extraction on thedetected face to obtain a face feature; and establishing userinformation of the driver in the database by using the face feature asthe face feature template of the driver, the user information includingthe face feature template of the driver and the identity informationinputted by the driver.

In one embodiment, the operations further include: storing the drivingstate monitoring result in the user information of the driver in thedatabase.

In one embodiment, the operations further include: performing imagecollection using an infrared camera to obtain the driver image.

In one embodiment, the performing image collection using an infraredcamera includes: performing image collection using the infrared cameradeployed in at least one location within a vehicle.

In one embodiment, the at least one location includes at least one ofthe following locations: a location above or near a dashboard, alocation above or near a center console, an A-pillar or nearby location,or a rear-view mirror or nearby location.

In one embodiment, the operations further include: performing drivergesture detection based on the driver image; and generating a controlinstruction based on a result of the driver gesture detection.

In one embodiment, the performing driver gesture detection based on thedriver image includes: detecting a hand key point in a driver image of acurrent frame; and using a static gesture determined based on thedetected hand key point as the result of the driver gesture detection.

In one embodiment, the performing driver gesture detection based on thedriver image includes: detecting hand key points of a plurality ofdriver image frames in a driver video; and using a dynamic gesturedetermined based on the detected hand key points of the plurality ofdriver image frames as the result of the driver gesture detection.

Based on the driving state monitoring methods and apparatuses, thedriver monitoring systems, the vehicles, the electronic devices, theprograms, and the mediums provided by the embodiments of the presentapplication, driver state detection can be performed on a driver image,and a driving state monitoring result of a driver can be outputted basedon the result of the driver state detection, to implement real-timemonitoring of the driving state of the driver, so that correspondingmeasures are taken in time when the driving state of the driver is poorto ensure safe driving and avoid road traffic accidents.

The following further describes in detail the technical solutions of thepresent application with reference to the accompanying drawings andembodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings constituting a part of the specification areused for describing embodiments of the present application and areintended to explain the principles of the present application togetherwith the descriptions.

According to the following detailed descriptions, this application canbe understood more clearly with reference to the accompanying drawings.

FIG. 1 is a flowchart of an embodiment of a driving state monitoringmethod according to the present application;

FIG. 2 is a flowchart of an embodiment of performing driver fatiguestate detection on a driver image according to the embodiments of thepresent application;

FIG. 3 is a flowchart of an embodiment of performing driver distractionstate detection on a driver image according to the embodiments of thepresent application;

FIG. 4 is a flowchart of an embodiment of performing scheduleddistraction action detection on a driver image according to theembodiments of the present application;

FIG. 5 is a flowchart of another embodiment of a driving statemonitoring method according to the present application;

FIG. 6 is a schematic structural diagram of an embodiment of a drivingstate monitoring apparatus of the present application;

FIG. 7 is a schematic structural diagram of another embodiment of adriving state monitoring apparatus of the present application;

FIG. 8 is a schematic structural diagram of an embodiment of a drivermonitoring system of the present application;

FIG. 9 is a schematic structural diagram of an embodiment of a displayregion of a display module in the driver monitoring system of thepresent application;

FIG. 10 is a schematic structural diagram of an embodiment of a vehicleof the present application; and

FIG. 11 is a schematic structural diagram of an application embodimentof an electronic device of the present application.

DETAILED DESCRIPTION

Various exemplary embodiments of the present application are nowdescribed in detail with reference to the accompanying drawings. Itshould be noted that, unless otherwise stated specifically, relativearrangement of the components and steps, the numerical expressions, andthe values set forth in the embodiments are not intended to limit thescope of the present application.

In addition, it should be understood that, for ease of description, asize of each part shown in the accompanying drawings is not drawn inactual proportion.

The following descriptions of at least one exemplary embodiment aremerely illustrative actually, and are not intended to limit the presentapplication and the applications or uses thereof.

Technologies, methods and devices known to a person of ordinary skill inthe related art may not be discussed in detail, but such technologies,methods and devices should be considered as a part of the specificationin appropriate situations.

It should be noted that similar reference numerals and letters in thefollowing accompanying drawings represent similar items. Therefore, oncean item is defined in an accompanying drawing, the item does not need tobe further discussed in the subsequent accompanying drawings.

The embodiments of the present application may be applied to electronicdevices such as terminal devices, computer systems, and servers, whichmay operate with numerous other general-purpose or special-purposecomputing system environments or configurations. Examples of well-knownterminal devices, computing systems, environments, and/or configurationssuitable for use together with the electronic devices such as terminaldevices, computer systems, and servers include, but are not limited to,personal computer systems, server computer systems, thin clients, thickclients, handheld or laptop devices, microprocessor-based systems, settop boxes, programmable consumer electronics, network personalcomputers, small computer systems, large computer systems, distributedcloud computing environments that include any one of the foregoingsystems, or the like.

The electronic devices such as terminal devices, computer systems, andservers may be described in the general context of computer systemexecutable instructions (for example, program modules) executed by thecomputer system. Generally, the program modules may include routines,programs, target programs, components, logics, data structures, or thelike, to execute specific tasks or implement specific abstract datatypes. The computer system/server may be practiced in the distributedcloud computing environments in which tasks are executed by remoteprocessing devices that are linked through a communications network. Inthe distributed computing environments, program modules may be locatedin local or remote computing system storage media including storagedevices.

FIG. 1 is a flowchart of an embodiment of a driving state monitoringmethod according to the present application. The driving statemonitoring method according to the embodiment of the present applicationmay be implemented through an apparatus (called in the embodiment of thepresent application: a driving state monitoring apparatus) or a system(called in the embodiment of the present application: a drivermonitoring system). As shown in FIG. 1, the driving state monitoringmethod of this embodiment includes the following.

102: Perform driver state detection on a driver image.

In an optional example, the operation 102 may be executed by a processorby invoking a corresponding instruction stored in a memory, or may beexecuted by a state detection module run by the processor.

104: Output a driving state monitoring result of a driver and/or performintelligent driving control based on a result of the driver statedetection.

In some of the embodiments, in the operation 104, the driving statemonitoring result of the driver may be outputted based on the result ofthe driver state detection.

In some of the embodiments, in the operation 104, intelligent drivingcontrol may be performed on a vehicle based on the result of the driverstate detection.

In some of the embodiments, in the operation 104, the driving statemonitoring result of the driver may be outputted based on the result ofthe driver state detection, and meanwhile, intelligent driving controlmay be performed on a vehicle.

In some of the embodiments, in the operation 104, outputting the drivingstate monitoring result of the driver may include: locally outputtingthe driving state monitoring result and/or remotely outputting thedriving state monitoring result. The locally outputting the drivingstate monitoring result refers to outputting the driving statemonitoring result by the driving state monitoring apparatus or thedriver monitoring system, or outputting the driving state monitoringresult to a central control system in the vehicle so that intelligentdriving control is performed on the vehicle based on the driving statemonitoring result. The remotely outputting the driving state monitoringresult, for example, may refer to sending the driving state monitoringresult to a cloud server or a management node so that the cloud serveror the management node collects, analyzes and/or manages the drivingstate monitoring result of the driver, or remotely controls the vehiclebased on the driving state monitoring result.

In an optional example, the operation 104 may be executed by a processorby invoking a corresponding instruction stored in the memory, or may beexecuted by an output module and/or an intelligent driving controlmodule run by the processor.

In an optional example, the foregoing operations 102-104 may be executedby a processor by invoking a corresponding instruction stored in thememory, or may be executed by a driver state detection control modulerun by the processor.

In some embodiments, the driver state detection, for example, mayinclude, but is not limited to, at least one of: driver fatigue statedetection, driver distraction state detection, or driver scheduleddistraction action detection. Thus, the result of the driver statedetection correspondingly includes, but is not limited to, at least oneof: the result of the driver fatigue state detection, the result of thedriver distraction state detection, or the result of the driverscheduled distraction action detection.

The scheduled distraction action in the embodiment of the presentapplication may be any distraction action that may distract the driver,for example, a smoking action, a drinking action, an eating action, aphone call action, an entertainment action or the like. The eatingaction is eating food, for example, fruit, snacks or the like. Theentertainment action is any action executed with the aid of anelectronic device, for example, sending messages, playing games, singingor the like. The electronic device is for example a mobile terminal, ahandheld computer, a game machine or the like.

Based on the driving state monitoring method provided in the foregoingembodiment of the present application, the driver state detection may beperformed on the driver image, and the driving state monitoring resultof the driver is outputted based on the result of the driver statedetection, to implement real-time monitoring of the driving state of thedriver, so that corresponding measures are taken in time when thedriving state of the driver is poor to ensure safe driving and avoidroad traffic accidents.

FIG. 2 is a flowchart of an embodiment of performing driver fatiguestate detection on a driver image according to embodiments of thepresent application. In an optional example, the embodiment shown inFIG. 2 may be executed by the processor by invoking a correspondinginstruction stored in a memory, or may be executed by a state detectionmodule run by the processor. As shown in FIG. 2, in some of theembodiments, the performing driver fatigue state detection on a driverimage includes the following.

202: Detect at least part of a face region of the driver in the driverimage to obtain state information of the at least part of the faceregion.

In an optional example, the foregoing at least part of the face regionmay include at least one of a driver's eye region, a driver's mouthregion, or a driver's entire face region. The state information of theat least part of the face region may include at least one of: eyeopen/closed state information or mouth open/closed state information.

The foregoing eye open/closed state information may be used fordetecting eye closure of the driver, for example, whether the driver'seyes are semi-closed (“semi-” represents the state that the eyes are notcompletely closed, for example, squinted in the sleepy state or thelike), whether the driver's eyes are closed, the number of eye closures,the eye closure amplitude or the like. The eye open/closed stateinformation may be optionally the information obtained by normalizationprocessing of the amplitude of eye opening. The mouth open/closed stateinformation may be used for yawn detection of the driver, for example,detecting whether the driver yawns, and the number of yawns or the like.The mouth open/closed state information may be optionally theinformation obtained by normalization processing of the amplitude ofmouth opening.

In an optional example, face key points detection may be performed onthe driver image, and computation is performed directly using an eye keypoint in the detected face key points, to obtain the eye open/closedstate information based on the computing result.

In an optional example, the eyes in the driver image are firstpositioned using the eye key point among the face key points (forexample, the coordinate information of the eye key point in the driverimage) to obtain an eye image, and an upper eyelid line and a lowereyelid line are obtained using the eye image. The eye open/closed stateinformation is obtained by computing the spacing between the uppereyelid line and the lower eyelid line.

In an optional example, computation is performed directly using a mouthkey point in the face key points, so as to obtain the mouth open/closedstate information based on the computing result.

In an optional example, the mouth in the driver image is firstpositioned using the mouth key point in the face key points (forexample, the coordinate information of the mouth key point in the driverimage) to obtain a mouth image through shearing, and an upper lip lineand a lower lip line are obtained using the mouth image. The mouthopen/closed state information is obtained by computing the spacingbetween the upper lip line and the lower lip line.

Operation 202 is executed on a plurality of driver image framescollected within a period of time to obtain the state information of atleast part of a plurality of face regions within the period of time.

204: Obtain a parameter value of an index for representing a driverfatigue state based on the state information of the at least part of theface regions within a period of time.

In some optional examples, the index for representing the driver fatiguestate for example may include, but are not limited to, at least one of:an eye closure degree or a yawning degree.

The parameter value of the eye closure degree for example may include,but are not limited to, at least one of: the number of eye closures, aneye closure frequency, eye closure duration, eye closure amplitude, thenumber of eye semi-closures, or eye semi-closure frequency; and/or theparameter value of the yawning degree for example may include, but arenot limited to, at least one of: a yawning state, the number of yawns,yawning duration, or yawning frequency.

206: Determine a result of the driver fatigue state detection based onthe parameter value of the index for representing the driver fatiguestate.

The foregoing result of the driver fatigue state detection may include:no fatigue state is detected, or a fatigue driving state. Alternatively,the foregoing result of the driver fatigue state detection may also be afatigue driving degree, where the fatigue driving degree may include:normal driving level (also called non-fatigue driving level) or fatiguedriving level. The fatigue driving level may be one level, or may bedivided into a plurality of different levels. For example, the foregoingfatigue driving level may be divided into fatigue driving prompt level(also called mild fatigue driving level) and fatigue driving warninglevel (also called severe fatigue driving level). Certainly, the fatiguedriving degree may be divided into more levels, for example, mildfatigue driving level, moderate fatigue driving level, and severefatigue driving level or the like. The present application does notlimit different levels of the fatigue driving degree.

In an optional example, each level of the fatigue driving degreecorresponds to a preset condition, and the level corresponding to thepreset condition satisfied by the parameter value of the index forrepresenting the driver fatigue state may be determined as the level ofthe fatigue driving degree.

In an optional example, the preset condition corresponding to the normaldriving level (also called non-fatigue driving level) may include:condition 20 a: no eye semi-closure and eye closure exist; and condition20 b: no yawning exists.

In the case that the foregoing conditions 20 a and 20 b are satisfied,the driver is in the normal driving level (also called non-fatiguedriving level) at present.

In an optional example, the preset condition corresponding to thefatigue driving prompt level may include: condition 20 c: eyesemi-closure exists; and condition 20 d: yawning exists.

In the case that any one of the foregoing conditions 20 c and 20 d issatisfied, the driver is in the fatigue driving prompt level at present.

In an optional example, the preset condition corresponding to thefatigue driving warning level may include: condition 20 e: there areclosed eyes, or the number of eye closures within a period of timereaches a preset number, or the duration of eye closure within a periodof time reaches a preset duration; and condition 20 f: the number ofyawns within a period of time reaches a preset number.

In the case that any one of the foregoing conditions 20 e and 20 f issatisfied, the driver is in the fatigue driving warning level atpresent.

FIG. 3 is a flowchart of an embodiment of performing driver distractionstate detection on a driver image according to the embodiments of thepresent application. In an optional example, the embodiment shown inFIG. 3 may be executed by the processor by invoking a correspondinginstruction stored in a memory, or may be executed by a state detectionmodule run by the processor. As shown in FIG. 3, in some of theembodiments, the performing driver distraction state detection on adriver image may include the following.

302: Perform face orientation and/or gaze direction detection on thedriver image to obtain face orientation information and/or gazedirection information.

The face orientation information may be used for determining whether theface direction of the driver is normal, for example, determining whetherthe driver turns his/her face or turns around or the like. The faceorientation information may be optionally an included angle between thefront of the face of the driver and the front of the vehicle driven bythe driver. The foregoing gaze direction information may be used fordetermining whether the gaze direction of the driver is normal, forexample, determining whether the driver gazes ahead or the like. Thegaze direction information may be used for determining whether the gazeof the driver deviates. The gaze direction information may be optionallyan included angle between the gaze of the driver and the front of thevehicle driven by the driver.

304: Determine a parameter value of an index for representing a driverdistraction state based on the face orientation information and/or thegaze direction information of the driver within a period of time.

The index for representing the driver distraction state for example mayinclude, but are not limited to, at least one of: a face orientationdeviation degree or a gaze deviation degree. In some of the optionalexamples, the parameter value of the face orientation deviation degreefor example may include, but are not limited to, at least one of: thenumber of head turns, head turning duration, or head turning frequency;and/or the parameter value of the gaze deviation degree for example mayinclude, but are not limited to, at least one of: a gaze directiondeviation angle, gaze direction deviation duration, or gaze directiondeviation frequency.

The foregoing gaze deviation degree for example may include: at leastone of whether the gaze deviates, whether the gaze severely deviates orthe like. The foregoing face orientation deviation degree (also calledthe face turning degree or the head turning degree) for example mayinclude: at least one of whether the head turns, whether the head turnsfor a short time, and whether the head turns for a long time.

In an optional example, if it is determined that the face orientationinformation is larger than the first orientation, and the phenomenon ofthe face orientation information being larger than the first orientationcontinues for N1 frames (for example, continuing for 9 frames, 10 framesor the like), it is determined that the driver has experienced along-time large-angle head turning, and the long-time large-angle headturning may be recorded, or the duration of this head turning may berecorded. If it is determined that the face orientation information isnot larger than the first orientation but is larger than the secondorientation, and the phenomenon of the face orientation informationbeing not larger than the first orientation but larger than the secondorientation continues for N1 frame (for example, lasting for 9 frames,10 frames or the like), it is determined that the driver has experienceda long-time small-angle head turning, and the long-time small-angle headturning may be recorded, or the duration of this head turning may berecorded.

In an optional example, if it is determined that the included anglebetween the gaze direction information and the front of the vehicle isgreater than a first included angle, and the phenomenon of the includedangle being greater than the first included angle continues for N2 frame(for example, continuing for 8 frames, 9 frames or the like), it isdetermined that the driver has experienced a severe gaze deviation, andthe severe gaze deviation may be recorded, or the duration of thissevere gaze deviation may be recorded. If it is determined that theincluded angle between the gaze direction information and the front ofthe vehicle is not greater than a first included angle but is greaterthan a second included angle, and the phenomenon of the included anglebeing not greater than the first included angle but greater than thesecond included angle continues for N2 frame (for example, continuingfor 9 frames, 10 frames or the like), it is determined that the driverhas experienced a gaze deviation, and the gaze deviation may berecorded, or the duration of this gaze deviation may be recorded.

In an optional example, the values of the foregoing first orientation,second orientation, first included angle, second included angle, N1, andN2 may be set according to actual situations, and the presentapplication does not limit the values.

306: Determine a result of the driver distraction state detection basedon the parameter value of the index for representing the driverdistraction state.

The result of the driver distraction state detection may include, forexample, the driver concentrates (the driver's attention is notdistracted), or the driver's attention is distracted. Alternatively, theresult of the driver distraction state detection may be the driverdistraction level, for example, the driver concentrates (the driver'sattention is not distracted), the driver's attention is slightlydistracted, the driver's attention is moderately distracted, thedriver's attention is severely distracted or the like. The driverdistraction level may be determined by a preset condition satisfied bythe parameter value of the index for representing the driver distractionstate. For example, if the gaze direction deviation angle and the faceorientation deviation angle are both less than the first preset angle,the driver distraction level is the driver concentration. If either ofthe gaze direction deviation angle and the face orientation deviationangle is not less than the preset angle, and the duration is not greaterthan the first preset duration and less than the second preset duration,the driver's attention is slightly distracted. If either of the gazedirection deviation angle and the face orientation deviation angle isnot less than the preset angle, and the duration is not greater than thesecond preset duration and less than the third preset duration, thedriver's attention is moderately distracted. If either of the gazedirection deviation angle and the face orientation deviation angle isnot less than the preset angle, and the duration is not less than thethird preset duration, the driver's attention is severely distracted.

This embodiment determines the parameter value of the index forrepresenting the driver distraction state by detecting the faceorientation and/or gaze direction of the driver image, determines theresult of the driver distraction state detection based on the parametervalue to determine whether the driver concentrates on driving, andquantizes the driving concentration degree into at least one index ofthe gaze deviation degree and the head turning degree throughquantization of the index for representing the driver distraction state,which is beneficial to evaluate the driving concentration state of thedriver in time and objectively.

In some of the embodiments, the performing face orientation and/or gazedirection detection on the driver image in operation 302 may include:detecting face key points of the driver image; and performing faceorientation and/or gaze direction detection based on the face keypoints.

Since the face key points generally contain feature information of headpose, in some of the optional examples, the performing face orientationdetection based on the face key points to obtain the face orientationinformation includes: obtaining feature information of head pose basedon the face key points; and determining the face orientation (alsocalled head pose) information based on the feature information of thehead pose. The face orientation information herein may represent, forexample, the direction and angle of face turning, and the direction ofthe turning herein may be turning to the left, turning to the right,turning down, and/or turning up or the like.

In an optional example, whether the driver concentrates on driving canbe determined through face orientation. The face orientation (head pose)may be represented as (yaw, pitch), where yaw and pitch separatelyrepresent a horizontal deflection angle (a yaw angle) and a verticaldeflection angle (a pitch angle) of the head in the normalized sphericalcoordinates (a camera coordinate system where a camera is located). Whenthe horizontal deflection angle and/or the vertical deflection angle isgreater than a preset angle threshold, and the duration is greater thana preset duration threshold, it may be determined that the result of thedriver distraction state detection is the driver's attention beingdistracted.

In an optional example, a corresponding neural network may be used toobtain the face orientation information of each driver image. Forexample, the foregoing detected face key points are inputted to a firstneural network, the feature information of the head pose is extractedvia the first neural network based on the received face key points andis inputted to a second neural network. Head pose estimation isperformed via the second neural network based on the feature informationof the head pose to obtain the face orientation information.

In the case of using a neural network, that is relatively mature and hasgood real-time characteristics, for extracting the feature informationof the head pose, and a neural network for estimating the faceorientation to obtain the face orientation information, for a videocaptured by the camera, the face orientation information correspondingto each image frame (i.e., each frame of the driver image) in the videocan be detected accurately and in time, thus improving the accuracy ofdetermining the driver's attention degree.

In some of the optional examples, the performing gaze directiondetection based on face key points to obtain the gaze directioninformation includes: determining a pupil edge location based on an eyeimage positioned by an eye key point among the face key points, andcomputing a pupil center location based on the pupil edge location; andcomputing the gaze direction information based on the pupil centerlocation and an eye center location, for example, computing a vector ofthe pupil center location to the eye center location in the eye image,the vector being the gaze direction information.

In an optional example, whether the driver concentrates on driving canbe determined through the gaze direction. The gaze direction may berepresented as (yaw, pitch), where yaw and pitch separately represent ahorizontal deflection angle (a yaw angle) and a vertical deflectionangle (a pitch angle) of the gaze in the normalized sphericalcoordinates (a camera coordinate system where a camera is located). Whenthe horizontal deflection angle and/or the vertical deflection angle isgreater than a preset angle threshold, and the duration is greater thana preset duration threshold, it may be determined that the result of thedriver distraction state detection is the driver's attention beingdistracted.

The determining the pupil edge location based on an eye image positionedby an eye key point among the face key points may be implemented in thefollowing approach: detecting, based on a third neural network, a pupiledge location of an eye region image among images divided based on theface key points, and obtaining the pupil edge location based oninformation outputted by the third neural network.

As an optional example, an eye image can be cut from the driver imageand enlarged, and the cut and enlarged eye image is provided to thethird neural network for pupil positioning to detect a pupil key pointand output the detected pupil key point. The pupil edge location isobtained based on the pupil key point outputted by the third neuralnetwork. The pupil center location can be obtained by computing thepupil edge location (for example, computing the circular centerlocation).

As an optional example, the eye center location can be obtained based onthe foregoing upper eyelid line and the lower eyelid line. For example,the coordinate information obtained by adding the coordinate informationof all key points of the upper eyelid line and the lower eyelid line,and dividing the number of all key points of the upper eyelid line andthe lower eyelid line is used as the eye center location. Certainly, theeye center location can also be obtained in other ways, for example,computing the eye key point among the detected face key points to obtainthe eye center location. The present application does not limit theimplementation of obtaining the eye center location.

In this embodiment, a more accurate pupil center location can beobtained by obtaining the pupil center location based on the pupil keypoint detection, and a more accurate eye center location can be obtainedby obtaining the eye center location based on the eyelid linepositioning, so that more accurate gaze direction information can beobtained when the gaze direction is determined using the pupil centerlocation and the eye center location. In addition, by positioning thepupil center location using the pupil key point detection, anddetermining the gaze direction using the pupil center location and theeye center location, the implementation of determining the gazedirection is accurate and easy to achieve.

In an optional example, the present disclosure may implement detectionof the pupil edge location and detection of the eye center locationusing the existing neural network.

FIG. 4 is a flowchart of an embodiment of performing scheduleddistraction action detection on a driver image according to theembodiments of the present application. In an optional example, theembodiment shown in FIG. 4 may be executed by the processor by invokinga corresponding instruction stored in a memory, or may be executed by astate detection module run by the processor. As shown in FIG. 4, in someof the embodiments, the performing scheduled distraction actiondetection on a driver image includes the following.

402: Perform target object detection corresponding to a scheduleddistraction action on the driver image to obtain a detection frame for atarget object.

404: Determine whether the scheduled distraction action occurs based onthe detection frame for the target object.

This embodiment provides an implementation solution of performingscheduled distraction action detection on the driver. By detecting thetarget object corresponding to the scheduled distraction action anddetermining whether the distraction action occurs based on the detectionframe for the detected target object, whether the driver is distractedcan be determined, which is contributive to obtain the accurate resultof the driver scheduled distraction action detection so as to improvethe accuracy of the driving state monitoring result.

For example, when the scheduled distraction action is a smoking action,the foregoing operations 402-404 may include: performing face detectionon the driver image via a fourth neural network to obtain a facedetection frame, and extracting feature information of the facedetection frame; and determining whether the smoking action occurs viathe fourth neural network based on the feature information of the facedetection frame.

For another example, when the scheduled distraction action is an eatingaction/drinking action/phone call action/entertainment action (i.e., aneating action and/or a drinking action and/or a phone call action and/oran entertainment action), the foregoing operations 402-404 may include:performing preset target object detection corresponding to the eatingaction/drinking action/phone call action/entertainment action on thedriver image via a fifth neural network to obtain a detection frame fora preset target object, where the preset target object include: hands,mouth, eyes, or a target item, the target item for example may include,but is not limited to, at least one of following types: containers,foods, and electronic devices; determining a detection result of thescheduled distraction action based on the detection frame for the presettarget object, the detection result of the scheduled distraction actionincluding one of: no eating action/drinking action/phone callaction/entertainment action occurs, the eating action occurs, thedrinking action occurs, the phone call action occurs, or theentertainment action occurs.

In some optional examples, when the scheduled distraction action is aneating action/drinking action/phone call action/entertainment action(i.e., an eating action and/or a drinking action and/or a phone callaction and/or an entertainment action), the determining a detectionresult of the scheduled distraction action based on the detection framefor the preset target object may include: determining the detectionresult of the scheduled dangerous action based on whether a detectionframe for the hands, a detection frame for the mouth, a detection framefor the eyes, or a detection frame for the target item are detected,whether the detection frame for the hands overlaps the detection framefor the target item, the type of the target item, and whether thedistance between the detection frame for the target item and thedetection frame for the mouth or the detection frame for the eyessatisfies preset conditions.

Optionally, if the detection frame for the hands overlaps the detectionframe for the target item, the type of the target item is a container orfood, and the detection frame for the target item overlaps the detectionframe for the mouth, it is determined that the eating action or thedrinking action occurs; and/or if the detection frame for the handsoverlaps the detection frame for the target item, the type of the targetitem is an electronic device, and the minimum distance between thedetection frame for the target item and the detection frame for themouth is less than a first preset distance, or the minimum distancebetween the detection frame for the target item and the detection framefor the eyes is less than a second preset distance, it is determinedthat the entertainment action or the phone call action occurs.

In addition, if the detection frame for the hands, the detection framefor the mouth, and the detection frame for any one target item are notdetected simultaneously, and the detection frame for the hands, thedetection frame for the eyes, and the detection frame for any one targetitems are not detected simultaneously, it is determined that thedetection result of the distraction action is that no eating action,drinking action, phone call action, and entertainment action isdetected; and/or if the detection frame for the hands does not overlapthe detection frame for the target item, it is determined that thedetection result of the distraction action is that no eating action,drinking action, phone call action, and entertainment action isdetected; and/or if the type of the target item is a container or food,and the detection frame for the target item does not overlap thedetection frame for the mouth, and/or the type of the target item is anelectronic device, and the minimum distance between the detection framefor the target item and the detection frame for the mouth is not lessthan the first preset distance, or the minimum distance between thedetection frame for the target item and the detection frame for the eyesis not less than the second preset distance, it is determined that thedetection result of the distraction action is that no eating action,drinking action, phone call action, and entertainment action isdetected.

In addition, the foregoing embodiment of performing scheduleddistraction action detection on the driver image may further include: ifthe result of the driver scheduled distraction action detection is thata scheduled distraction action is detected, prompting the detecteddistraction action. For example, when the smoking action is detected,prompting the detection of smoking; when the drinking action isdetected, prompting the detection of drinking; and when the phone callaction is detected, prompting the detection of a phone call.

In an optional example, the foregoing operations of prompting thedetected distraction action may be executed by a processor by invoking acorresponding instruction stored in a memory, or may be executed by afirst prompting module run by the processor.

In addition, with reference to FIG. 4 again, another embodiment ofperforming driver scheduled distraction action detection on the driverimage may also selectively include the following.

406: If the scheduled distraction action occurs, obtain a parametervalue of an index for representing a driver distraction degree based ona determination result indicating whether the scheduled distractionaction occurs within a period of time. The index for representing driverdistraction degree for example may include, but are not limited to, atleast one of: the number of occurrences of the scheduled distractionaction, duration of the scheduled distraction action, or frequency ofthe scheduled distraction action, e.g., the number of occurrences of thesmoking action, the duration of the smoking action, or the frequency ofthe smoking action; the number of occurrences of the drinking action,the duration of the drinking action, or the frequency of the drinkingaction; the number of occurrences of the phone call action, the durationof the phone call action, or the frequency of the phone call action, orthe like.

408: Determine a result of the driver scheduled distraction actiondetection based on the parameter value of the index for representing thedistraction degree.

The foregoing result of the driver scheduled distraction actiondetection may include: the scheduled distraction action is not detected,or the scheduled distraction action is detected. In addition, theforegoing result of the driver scheduled distraction action detectionmay also be the distraction level. For example, the foregoingdistraction level may for example be divided into: non-distraction level(also called concentrated driving level), distraction driving promptinglevel (also called mild distraction driving level), and distractiondriving warning level (also called severe distraction driving level).Certainly, the distraction level may also be divided into more levels,for example, non-distraction level driving, mild distraction drivinglevel, moderate distraction driving level, severe distraction drivinglevel or the like. Certainly, the distraction level in each embodimentof the present application may also be divided according to otherconditions which are not limited the foregoing level division condition.

The distraction level may be determined by a preset condition satisfiedby the parameter value of the index for representing the distractiondegree. For example, if the scheduled distraction action is notdetected, the distraction level is the non-distraction level (alsocalled concentrated driving level); if it is detected that the durationof the scheduled distraction action is less than a first presetduration, and the frequency is less than a first preset frequency, thedistraction level is the mild distraction driving level; and if it isdetected that the duration of the scheduled distraction action isgreater than the first preset duration, and/or the frequency is greaterthan the first preset frequency, the distraction level is the severedistraction driving level.

In addition, another embodiment of the driving state monitoring methodof the present application may further include: outputting distractionprompt information based on the result of the driver distraction statedetection and/or the result of the driver scheduled distraction actiondetection.

In general, if the result of the driver distraction state detection isthe driver distraction, or the driver distraction level, and/or theresult of the driver scheduled distraction action detection is that thescheduled distraction action is detected, the distraction promptinformation may be outputted to remind the driver of concentration ondriving.

In an optional example, the foregoing operation of outputting thedistraction prompt information based on the result of the driverdistraction state detection and/or the result of the driver scheduleddistraction action detection may be executed by a processor by invokinga corresponding instruction stored in a memory, or may be executed by asecond prompting module run by the processor.

With reference to FIG. 5, another embodiment of the driving statemonitoring method of the present application includes the following.

502: Perform driver fatigue state detection, driver distraction statedetection and driver scheduled distraction action detection on thedriver image to obtain the result of the driver fatigue state detection,the result of the driver distraction state detection and the result ofthe driver scheduled distraction action detection.

504: Determine a driving state level according to a preset conditionthat the result of the driver fatigue state detection, the result of thedriver distraction state detection, and the result of the driverscheduled distraction action detection satisfy.

506: Use the determined driving state level as the driving statemonitoring result.

In an optional example, each driving state level corresponds to a presetcondition; the preset condition that the result of the driver fatiguestate detection, the result of the driver distraction state detectionand the result of the driver scheduled distraction action detectionsatisfy may be determined in real time; and the driving state levelcorresponding to the satisfied preset condition may be determined as thedriver's driving state monitoring result. The driving state level forexample may include: the normal driving state (also called concentrateddriving level), the driving prompting state (the driving state is poor),and the driving warning state (the driving state is very poor).

In an optional example, the foregoing embodiment shown in FIG. 5 may beexecuted by a processor by invoking a corresponding instruction storedin a memory, or may be executed by an output module run by theprocessor.

For example, in an optional example, the preset condition correspondingto the normal driving level (also called concentrated driving level) mayinclude: condition 1: the result of the driver fatigue state detectionis: no fatigue state is detected, or non-fatigue driving level;condition 2: the result of the driver distraction state detection is:the driver concentrates on driving; and condition 3: the result of thedriver scheduled distraction action detection is: no scheduleddistraction action is detected, or the non-distraction level.

In the case that the foregoing conditions 1, 2, and 3 are all satisfied,the driving state level is the normal driving state (also calledconcentrated driving level).

For example, in an optional example, the preset condition correspondingto the driving prompting state (the driving state is poor) may include:condition 11: the result of the driver fatigue state detection is: thefatigue driving prompting level (also called the mild fatigue drivinglevel); condition 22: the result of the driver distraction statedetection is: the driver's attention is slightly distracted; andcondition 33: the result of the driver scheduled distraction actiondetection is: the distraction driving prompting level (also called themild distraction driving level).

In the case that any one of the foregoing conditions 11, 22, and 33 issatisfied, and the results in the other conditions do not reach thepreset conditions corresponding to the more severe fatigue drivinglevel, the attention distraction level, and the distraction level, thedriving state level is the driving prompting state (the driving state ispoor).

For example, in an optional example, the preset condition correspondingto the driving warning level (the driving level is very poor) mayinclude: condition 111: the result of the driver fatigue state detectionis: the fatigue driving warning level (also called the severe fatiguedriving level); condition 222: the result of the driver distractionstate detection is: the driver's attention is severely distracted; andcondition 333: the result of the driver scheduled distraction actiondetection is: the distraction driving warning level (also called thesevere distraction driving level).

In the case that any one of the foregoing conditions 111, 222, and 333is satisfied, the driving state level is the driving warning state (thedriving state is very poor).

Furthermore, a further embodiment of the driving state monitoring methodof the present application may further include the following.

508: Perform a control operation corresponding to the driving statemonitoring result.

In an optional example, the foregoing operation 508 may be executed by aprocessor by invoking a corresponding instruction stored in a memory, ormay be executed by a first control module run by the processor.

In some of the optional examples, the operation 508 may include at leastone of: if the driving state monitoring result satisfies a predeterminedprompting/warning condition, e.g., satisfying a preset conditioncorresponding to the driving prompting state (the driving state is poor)or the driving state level is the driving prompting state (the drivingstate is poor), outputting prompting/warning information correspondingto the predetermined prompting/warning condition, e.g., prompting thedriver with sound (e.g., voice or ringing or the like)/light (light upor light flashing or the like)/vibration or the like to call forattention of the driver so that the driver returns the distractedattention to driving or takes a rest, thereby implementing safe drivingand avoiding road traffic accidents; and/or if the driving statemonitoring result satisfies a predetermined driving mode switchingcondition or satisfies a preset condition corresponding to the drivingwarning state (the driving state is very poor), or the driving statelevel is the distraction driving warning level (also called the severefatigue driving level), switching a driving mode to an automatic drivingmode to implement safe driving and avoid road traffic accidents; andmoreover, prompting the driver with sound (e.g., voice or ringing or thelike)/light (light up or light flashing or the like)/vibration or thelike to call for attention of the driver so that the driver returns thedistracted attention to driving or takes a rest. It should be noted thatthe expression of “/” in the present disclosure represents the meaningof “or”; the expression of “A and/or B” in the present disclosurerepresents the meaning of “at least one of A or B”.

In addition, a further embodiment of the driving state monitoring methodof the present application may further include: performing imagecollection using an infrared camera, for example, performing imagecollection using an infrared camera deployed in at least one locationwithin the vehicle to obtain a driver image.

The driver image in the embodiment of the present application isgenerally an image frame in a video captured by the infrared camera(including a near-infrared camera or the like) from a cab.

The wavelength of the infrared camera may include 940 nm or 850 num. Theinfrared camera may be provided at any location, where the driver can bephotographed, in the cab of the vehicle. For example, the infraredcamera may be deployed at at least one of the following locations: alocation above or near a dashboard, a location above or near a centerconsole, an A-pillar or nearby location, or a rear-view mirror or nearbylocation. For example, in some optional examples, the infrared cameracan be disposed above the dashboard (such as directly above) and faceforward, can be disposed above the center console (such as the middlelocation) and face forward, can be disposed on the A-pillar (such as itcan be attached to the glass near the A-pillar) and face the driver'sface, and can also be disposed on the rear-view mirror (such as it canbe attached to the glass above the rear-view mirror) and face thedriver's face. When the infrared camera is disposed above the dashboardor above the center console, the specific location of the camera can bedetermined based on the angle of view of the camera and the location ofthe driver. For example, when the camera is disposed above thedashboard, the infrared camera faces the driver, to ensure that theangle of view of the camera is not blocked by the steering wheel. Whenthe camera is disposed at the location above the center console, if theangle of view of the camera is large enough, it can be aimed at the reararea to ensure that the driver is within the field of view of thecamera; and if the angle of view is not large enough, the camera facesthe driver to ensure that the driver is present in the angle of view ofthe infrared camera.

Since the light in the region where the driver is located (such as, inthe car or in the cab) is often complicated, the quality of the driverimage captured by an infrared camera tends to be better than the qualityof the driver image captured by an ordinary camera, especially at nightor in a dark environment such as a cloudy day or in a tunnel, thequality of the driver image captured by the infrared camera is usuallysignificantly better than the quality of the driver image captured bythe ordinary camera, which is beneficial to improve the accuracy of thedriver distraction state detection and distraction action detection, soas to improve the accuracy of driving state monitoring.

Optionally, in practical application, the original image captured by thecamera often cannot be directly used due to various restrictions andrandom interference. In some optional examples of the presentapplication, gray-scale preprocessing can be performed on the driverimage captured by the infrared camera, so that a red, green and blue(RGB) 3-channel image is converted into a gray-scale image, and then theoperations such as the driver's identity authentication, distractionstate detection and distraction action detection are performed toimprove the accuracy of identity authentication, distraction statedetection and distraction action detection.

In addition, each of the foregoing embodiments of the presentapplication may further include: performing driver gesture detectionbased on the driver image; and generating a control instruction based onthe result of the driver gesture detection.

In an optional example, the foregoing operation of performing drivergesture detection based on the driver image may be executed by aprocessor by invoking a corresponding instruction stored in a memory, ormay be executed by a gesture detection module run by the processor. Inan optional example, the foregoing operation of generating a controlinstruction based on the result of the driver gesture detection may beexecuted by a processor by invoking a corresponding instruction storedin a memory, or may be executed by an instruction generation module runby the processor.

In some of the embodiments, the performing driver gesture detectionbased on the driver image may include: detecting a hand key point in adriver image of a current frame; and using a static gesture determinedbased on the detected hand key point as the result of the driver gesturedetection, i.e., the driver gesture detected at this moment is thestatic gesture.

In some of the embodiments, the performing driver gesture detectionbased on the driver image may include: detecting hand key points of aplurality of driver image frames in a driver video captured by theinfrared camera; and using a dynamic gesture determined based on thedetected hand key points of the plurality of driver image frames as theresult of the driver gesture detection, i.e., the driver gesturedetected at this moment is the dynamic gesture.

The control instruction generated based on the result of the drivergesture detection may be used for controlling the state of the vehicleor components or applications on the vehicle and the working statesthereof, e.g., lifting/lowering the window, adjusting the volume,turning on an air conditioner, turning off the air conditioner,adjusting the air volume of the air conditioner, making a call,answering the phone, enabling or disabling applications (such as music,radio, or Bluetooth) or the like.

In addition, each of the foregoing embodiments of the presentapplication may further include: performing facial recognition on thedriver image; and performing authentication control based on the resultof the facial recognition.

In an optional example, the foregoing operation of performing facialrecognition on the driver image may be executed by a processor byinvoking a corresponding instruction stored in a memory, or may beexecuted by a facial recognition module run by the processor. Theforegoing operation of performing authentication control based on theresult of the facial recognition may be executed by a processor byinvoking a corresponding instruction stored in a memory, or may beexecuted by a second control module run by the processor.

In some of the embodiments, the performing facial recognition on thedriver image may include the following.

Perform face detection on the driver image via a sixth neural network,and perform feature extraction on the detected face to obtain a facefeature. For example, the sixth neural network may perform face locationdetection on each input driver image frame, output a face detectionframe, and perform feature extraction on the face in the face detectionframe.

Perform face matching between the face feature and face featuretemplates in a database. For example, a threshold can be preset, andperform search matching between the extracted face feature and the facefeature templates stored in the database. If the similarity between theextracted face feature and a certain face feature template in thedatabase exceeds the preset threshold, it is determined that theextracted face feature matches the face feature template, and it isindicated that the driver is a registered user, and user information ofthe driver, including the face feature template and identity information(e.g., name, login name or the like), exists in the database; and if thesimilarity between the extracted face feature and any face featuretemplate in the database does not exceed the preset threshold, it isdetermined that no face feature template matching the foregoing facefeature exists in the database, and it is indicated that the driver isan unregistered user.

If a face feature template matching the face feature exists in thedatabase, output identity information corresponding to the face featuretemplate matching the face feature.

And/or if no face feature template matching the foregoing face featureexists in the database, prompt the driver to register; in response toreceiving a registration request from the driver, perform face detectionon the collected driver image via the sixth neural network, and performfeature extraction on the detected face to obtain the face feature;establish user information of the driver in the database by using theface feature as the face feature template of the driver, the userinformation including the face feature template of the driver and theidentity information inputted by the driver.

Furthermore, the foregoing embodiment may further include: storing thedriving state monitoring result in the user information of the driver inthe database; and recording the driving state monitoring result of thedriver to facilitate subsequent consulting the driving state monitoringresult of the driver, or analyzing and collecting statistics about thedriving behavior habits of the driver.

This embodiment implements identity authentication and registration ofthe driver through facial recognition to identify the identityinformation of the driver, and records and analyzes the driving statemonitoring result of the driver so as to learn about the drivingbehavior habits of the driver or the like.

In some of the application scenarios, when the driver starts the vehicleand starts the driving monitoring apparatus or the driver monitoringsystem, the facial recognition on the driver image collected by theinfrared camera is performed, and based on the result of the facialrecognition indicating whether the driver is a registered user,corresponding authentication control operation is performed. Forexample, only when the driver is the registered user, the driver isallowed to start the vehicle and enter the driving monitoring apparatusor the driver monitoring system.

Alternatively, in other application scenarios, when the driver requeststo use a gesture control function, the facial recognition on the driverimage collected by the infrared camera is performed, and based on theresult of the facial recognition indicating whether the driver is aregistered user, corresponding authentication control operation isperformed. For example, only when the driver is the registered user, thedriver gesture detection is performed based on the driver image, and acontrol command is generated based on the result of the driver gesturedetection.

The driving state monitoring method of the foregoing embodiment of thepresent application can be implemented by: performing image collectionby an infrared (including near-infrared) camera to obtain an driverimage, and then sending the driver image to a single chip microcomputer,FPGA, ARM, CPU, GPU, or microprocessor which can load the neuralnetwork, as well as an electronic device such as a smart mobile phone, anotebook computer, a tablet computer (PAD), a desktop computer, or aserver for implementation. The electronic device can run a computerprogram (also called a program code), the computer program may be storedin a computer readable storage medium such as a flash memory, a cache, ahard disk, or an optical disk.

Any driving state monitoring method provided by the embodiments of thepresent application may be executed by any suitable device having dataprocessing capacity, including, but are not limited to, a terminaldevice, a server or the like. Alternatively, any driving statemonitoring method provided by the embodiments of the present applicationmay be executed by the processor, for example, the processor executesany driving state monitoring method provided by the embodiments of thepresent application by invoking a corresponding instruction stored inthe memory, and details are not described below again.

The person of ordinary skill in the art may understand that all or somesteps for implementing the embodiments of the foregoing method may beachieved by a program instruction related hardware; the foregoingprogram can be stored in a computer readable storage medium; when theprogram is executed, steps including the embodiments of the foregoingmethod is executed. Moreover, the foregoing storage medium includesvarious media capable of storing program codes, such as ROM, RAM, amagnetic disk, or an optical disk.

FIG. 6 is a schematic structural diagram of an embodiment of a drivingstate monitoring apparatus of the present application. The driving statemonitoring apparatus of the embodiment may be configured to implementeach of the foregoing embodiments of the driving state monitoring methodof the present application. As shown in FIG. 6, the driving statemonitoring apparatus of the embodiment includes: a state detectionmodule, and an output module and/or an intelligent driving controlmodule.

The state detection module is configured to perform driver statedetection on a driver image.

For an optional implementation solution of the state detection modulefor performing driver state detection on the driver image in theembodiment, reference may be made to the corresponding operation in thedriving state monitoring method according to any of the foregoingembodiments of the present application, and details are not describedherein again.

The output module is configured to output a driving state monitoringresult of a driver based on a result of the driver state detection.

For an optional implementation solution of the output module foroutputting the driving state monitoring result of the driver based onthe result of the driver state detection in the embodiment, referencemay be made to the corresponding operation in the driving statemonitoring method according to any of the foregoing embodiments of thepresent application, and details are not described herein again.

The intelligent driving control module is configured to performintelligent driving control on a vehicle based on the result of thedriver state detection.

In some embodiments, the driver state detection, for example, mayinclude, but is not limited to, at least one of: driver fatigue statedetection, driver distraction state detection, or driver scheduleddistraction action detection, and thus, the result of the driver statedetection correspondingly includes, but is not limited to, at least oneof: a result of the driver fatigue state detection, a result of thedriver distraction state detection, or a result of the driver scheduleddistraction action detection.

In some embodiments, the output module is configured, when outputtingthe driving state monitoring result of the driver based on the result ofthe driver state detection, to: determine a driving state levelaccording to a preset condition that the result of the driver fatiguestate detection, the result of the driver distraction state detection,and the result of the driver scheduled distraction action detectionsatisfy; and use the determined driving state level as the driving statemonitoring result.

The scheduled distraction action in the embodiment of the presentapplication may be any distraction action that may distract the driver,for example, a smoking action, a drinking action, an eating action, aphone call action, an entertainment action or the like. The eatingaction is eating foods, for example, fruits, snacks or the like. Theentertainment action is any action executed with the aid of anelectronic device, for example, sending messages, playing games, singingor the like. The electronic device is for example a mobile terminal, ahandheld computer, a game machine or the like.

Based on the driving state monitoring apparatus provided by theforegoing embodiment of the present application, driver state detectioncan be performed on the driver image, and the driving state monitoringresult of the driver is outputted based on the result of the driverstate detection, to implement real-time monitoring of the driving stateof the driver, so that corresponding measures are taken in time when thedriving state of the driver is poor to ensure safe driving and avoidroad traffic accidents.

FIG. 7 is a schematic structural diagram of another embodiment of adriving state monitoring apparatus of the present application. As shownin FIG. 7, compared with the embodiment shown in FIG. 6, the drivingstate monitoring apparatus of the embodiment further includes: a firstprompting module, configured to prompt, if the result of the driverscheduled distraction action detection is that a scheduled distractionaction is detected, the detected distraction action.

With reference to FIG. 7 again, another embodiment of the driving statemonitoring apparatus of the present application may further include: asecond prompting module, configured to output distraction promptinformation based on the result of the driver distraction statedetection and/or the result of the driver scheduled distraction actiondetection.

In addition, with reference to FIG. 7 again, a further embodiment of thedriving state monitoring apparatus of the present application mayfurther include: a first control module, configured to perform a controloperation corresponding to the driving state monitoring result.

In some of the embodiments, the first control module is configured to:output prompting/warning information corresponding to the predeterminedprompting/warning condition if the determined driving state monitoringresult satisfies the predetermined prompting/warning condition; and/orswitch a driving mode to an automatic driving mode if the determineddriving state monitoring result satisfies the predetermined driving modeswitching condition.

In addition, a further embodiment of the driving state monitoringapparatus of the present application may further include: a facialrecognition module, configured to perform facial recognition on thedriver image; and a second control module, configured to performauthentication control based on a result of the facial recognition.

In some of the embodiments, the facial recognition module is configuredto: perform face detection on the driver image via a sixth neuralnetwork, and perform feature extraction on the detected face to obtain aface feature; perform face matching between the face feature and a facefeature template in a database; and if the face feature templatematching the face feature exists in the database, output identityinformation corresponding to the face feature template matching the facefeature.

In some other embodiments, the second control module is furtherconfigured to: if no face feature template matching the face featureexists in the database, prompt the driver to register; and establishuser information of the driver in the database by using the face featuresent by the facial recognition module as the face feature template ofthe driver, the user information including the face feature template ofthe driver and the identity information inputted by the driver.Accordingly, the facial recognition module is further configured to, inresponse to receiving a registration request from the driver, performface detection on the collected driver image via the sixth neuralnetwork, and perform feature extraction on the detected face to obtain aface feature, and send the face feature to the second control module.

In some other embodiments, the output module is further configured tostore the driving state monitoring result in the user information of thedriver in the database.

In addition, with reference to FIG. 7 again, another embodiment of thedriving state monitoring apparatus of the present application mayfurther include: at least one infrared camera correspondingly deployedin at least one location within a vehicle, and configured to performimage collection to obtain the driver image.

At least one location for example may include, but is not limited to, atleast one of the following locations: a location above or near adashboard, a location above or near a center console, an A-pillar ornearby location, or a rear-view mirror or nearby location.

In addition, a further embodiment of the driving state monitoringapparatus of the present application may further include: a gesturedetection module, configured to perform driver gesture detection basedon the driver image; and an instruction generation module, configured togenerate a control instruction based on a result of the driver gesturedetection.

In some of the embodiments, the gesture detection module is configuredto detect a hand key point in a driver image of a current frame, and usea static gesture determined based on the detected hand key point as theresult of the driver gesture detection.

In some of the embodiments, the gesture detection module is configuredto detect hand key points of a plurality of driver image frames in adriver video, and use a dynamic gesture determined based on the detectedhand key points of the plurality of driver image frames as the result ofthe driver gesture detection.

FIG. 8 is a schematic structural diagram of an embodiment of a drivermonitoring system of the present application. The driver monitoringsystem of the embodiment may be configured to implement each of theforegoing embodiments of the driving state monitoring method of thepresent application. As shown in FIG. 8, the driver monitoring system ofthe embodiment includes a display module and a driver state detectionmodule.

The display module is configured to display a driver image and a drivingstate monitoring result of the driver.

The driver state detection module is configured to perform driver statedetection on the driver image, and output the driving state monitoringresult of the driver based on a result of the driver state detection.

The driver state detection may include, but is not limited to at leastone of: driver fatigue state detection, driver distraction statedetection, or driver scheduled distraction action detection.

Based on the driver monitoring system provided by the foregoingembodiment of the present application, driver state detection may beperformed on the driver image, and the driving state monitoring resultof the driver is outputted based on the result of the driver statedetection, to implement real-time monitoring of the driving state of thedriver, so that corresponding measures are taken in time when thedriving state of the driver is poor to ensure safe driving and avoidroad traffic accidents.

In some of the embodiments, the display module includes: a first displayregion, configured to display the driver image and prompting/warninginformation corresponding to the driving state monitoring result; and asecond display region, configured to display a scheduled distractionaction.

In some of the embodiments, the driver state detection module is furtherconfigured to perform facial recognition on the driver image.Accordingly, the first display region is further configured to display aresult of the facial recognition.

In some of the embodiments, the driver state detection module is furtherconfigured to perform driver gesture detection based on the driverimage. Accordingly, the display module further includes: a third displayregion, configured to display a result of the gesture detection, theresult of the gesture detection including a static gesture or a dynamicgesture.

FIG. 9 is a schematic structural diagram of an embodiment of a displayregion of the display module in the driver monitoring system of thepresent application.

FIG. 10 is a schematic structural diagram of an embodiment of a vehicleof the present application. As shown in FIG. 10, the vehicle of theembodiment includes a central control system, and further includes thedriving state monitoring apparatus or the driver monitoring systemaccording to any one of the foregoing embodiments of the presentapplication.

In some of the embodiments, the central control system is configured to:perform intelligent driving control based on the result of the driverstate detection outputted by the driving state monitoring apparatus orthe driver monitoring system; and/or switch a driving mode to anautomatic driving mode when the driving state monitoring resultoutputted by the driving state monitoring apparatus or the drivermonitoring system satisfies a predetermined driving mode switchingcondition, and perform automatic driving control on the vehicle in theautomatic driving mode; and/or invoke, when the driving state monitoringresult satisfies the preset predetermined prompting/warning condition,an entertainment system (such as a speaker, a buzzer, or a lightingdevice) in the vehicle or an entertainment system (such as a speaker, abuzzer, or a lighting device) external to the vehicle to outputprompting/warning information corresponding to the predeterminedprompting/warning condition.

In another embodiment, the central control system is further configuredto correspondingly control the vehicle or the components (such as thewindows, the air conditioner, or the player) or applications (such asmusic, radio, or Bluetooth) on the vehicle or the like based on acontrol instruction generated based on the result of the gesturedetection outputted by the driving state monitoring apparatus or thedriver monitoring system.

In another embodiment, the central control system is further configuredto switch a driving mode to a manual driving mode when a drivinginstruction of switching to manual driving is received.

With reference to FIG. 10 again, the vehicle of the foregoing embodimentmay further include: an entertainment system, configured to output theprompting/warning information corresponding to the predeterminedprompting/warning condition according to the control instruction of thecentral control system; and/or adjust the pre-warning effect of theprompting/warning information or the playing effect of entertainmentaccording to the control instruction of the central control system.

The entertainment system, for example, may include a speaker, a buzzer,or a lighting device.

With reference to FIG. 10 again, the vehicle of the foregoing embodimentmay further include: at least one infrared camera, configured to performimage collection.

In some of the embodiments, the infrared camera in the vehicle may bedeployed in at least one location within the vehicle, e.g., may bedeployed in at least one of the following locations: a location above ornear a dashboard, a location above or near a center console, an A-pillaror nearby location, or a rear-view mirror or nearby location or thelike.

FIG. 11 is a schematic structural diagram of an application embodimentof an electronic device of the present application. With reference toFIG. 11 below, FIG. 11 is a schematic structural diagram of anelectronic device suitable for implementing a terminal device or aserver of an embodiment of the present application. As shown in FIG. 11,the electronic device includes one or more processors, a communicationportion or the like. The one or more processors are, for example, one ormore central processing units (CPUs), and/or one or more imageprocessors (GPUs) or the like. The processor may execute variousappropriate actions and processing according to executable instructionsstored in a read only memory (ROM) or executable instructions loadedfrom a memory portion into a random access memory (RAM). Thecommunication portion may include, but is not limited to, a networkcard. The network card may include, but is not limited to, an IB(Infiniband) network card. The processor may communicate with the ROMand/or the RAM to execute executable instructions. The processor isconnected to the communication portion through the bus, and communicateswith other target devices via the communication portion, therebycompleting operations corresponding to any method provided by theembodiments of the present application, for example, performing driverstate detection on the driver image; and outputting the driving statemonitoring result of the driver and/or performing intelligent drivingcontrol based on the result of the driver state detection.

In addition, the RAM may further store various programs and datarequired during an operation of the apparatus. The CPU, the ROM, and theRAM are connected to each other via the bus. In the presence of the RAM,the ROM is an optional module. The RAM stores executable instructions,or writes executable instructions into the ROM during running. Theexecutable instructions cause the processor to perform the operations ofthe method according to any one of the embodiments of the presentapplication. An input/output (I/O) interface is also connected to thebus. The communication portion may be integrated, or may be set ashaving a plurality of sub-modules (for example, a plurality of IBnetwork cards) respectively connected to the bus.

The following components are connected to the I/O interface: an inputportion including a keyboard, a mouse or the like; an output portionincluding a cathode-ray tube (CRT), a liquid crystal display (LCD), aspeaker or the like; a storage portion including a hard disk or thelike; and a communication portion of a network interface card includingan LAN card, a modem or the like. The communication portion executescommunication processing through a network such as the Internet. A driveis also connected to the I/O interface according to requirements. Aremovable medium such as a magnetic disk, an optical disk, amagneto-optical disk, a semiconductor memory or the like is installed onthe drive according to requirements, so that a computer program readfrom the removable medium may be installed on the storage portionaccording to requirements.

It should be noted that, the architecture shown in FIG. 11 is merely anoptional implementation. During specific practice, the number and typesof the components in FIG. 11 may be selected, decreased, increased, orreplaced according to actual requirements. Different functionalcomponents may be separated or integrated or the like. For example, theGPU and the CPU may be separated, or the GPU may be integrated on theCPU, and the communication portion may be separated from or integratedon the CPU or the GPU or the like. These alternative implementations allfall within the protection scope of the present application.

Particularly, a process described above with reference to a flowchartaccording to an embodiment of the present application may be implementedas a computer software program. For example, an embodiment of thepresent application includes a computer program product. The computerprogram product includes a computer program tangibly included in amachine-readable medium. The computer program includes a program codefor executing a method shown in the flowchart. The program code mayinclude instructions for executing each corresponding step of thedriving state monitoring method according to any one of the embodimentsof the present application. In such embodiment, the computer program isdownloaded and installed from the network through the communicationportion, and/or is installed from the removable medium. When executed bythe CPU, the computer program executes the foregoing function defined inthe method of the present application.

In addition, the embodiment of the present application also provides acomputer program, including computer instructions. When the computerinstructions run in a processor of a device, the driving statemonitoring method according to any one of the foregoing embodiments ofthe present application is implemented.

In addition, the embodiment of the present application also provides acomputer readable storage medium having a computer program storedthereon. When the computer program is executed by a processor, thedriving state monitoring method according to any one of the foregoingembodiments of the present application is implemented.

Various embodiments in this description are described in a progressivemanner, emphasized descriptions of each embodiment may include adifference between this embodiment and another embodiment, and same orsimilar parts between the embodiments may be cross-referenced. For thesystem embodiment, since the system embodiment basically corresponds tothe method embodiment, the description is relatively simple. For relatedparts, refer to related descriptions of the method embodiment.

The methods, the apparatuses, the systems and the devices of the presentapplication may be implemented in many manners. For example, themethods, apparatuses, systems and devices of the present application maybe implemented by using software, hardware, firmware, or any combinationof software, hardware, and firmware. Unless otherwise specially stated,the foregoing sequences of steps of the methods are merely fordescription, and are not intended to limit the steps of the methods ofthe present application. In addition, in some embodiments, the presentapplication may be implemented as programs recorded in a recordingmedium. The programs include machine-readable instructions forimplementing the methods according to the present application.Therefore, the present application further covers the recording mediumstoring the programs for performing the methods according to the presentapplication.

The descriptions of the present application are provided for the purposeof examples and description, and are not intended to be exhaustive orlimit the present application to the disclosed form. Many modificationsand changes are obvious to a person of ordinary skill in the art. Theembodiments are selected and described to better describe a principleand an actual application of the present application, and to make theperson of ordinary skill in the art understand the present application,so as to design various embodiments with various modificationsapplicable to particular use.

1. A driving state monitoring method, comprising: detecting a driver state on a driver image; and outputting a driving state monitoring result of a driver and/or performing an intelligent driving control based on the detected driver state; wherein the detecting comprises at least one of: driver fatigue state detection, driver distraction state detection, or driver scheduled distraction action detection, wherein, the driver distraction state detection comprises: performing gaze direction detection on the driver in the driver image to obtain gaze direction information, and the gaze direction detection comprises: determining a pupil edge location based on an eye image positioned by an eye key point among face key points, and computing a pupil center location based on the pupil edge location; and computing gaze direction information based on the computed pupil center location and an eye center location.
 2. The method according to claim 1, wherein the driver fatigue state detection comprises: detecting at least part of a face region of the driver in the driver image to obtain state information of the at least part of the face region, the obtained state information comprising at least one of: eye open/closed state information or mouth open/closed state information; obtaining a parameter value of an index for representing a driver fatigue state based on the state information of the at least part of the face region within a period of time; and determining the driver fatigue state based on the obtained parameter value; wherein the index for representing the driver fatigue state comprises at least one of: an eye closure degree or a yawning degree; wherein the parameter value of the eye closure degree comprises at least one of: a number of eye closures, an eye closure frequency, eye closure duration, eye closure amplitude, a number of eye semi-closures, or an eye semi-closure frequency; wherein the parameter value of the yawning degree comprises at least one of: a yawning state, a number of yawns, yawning duration, or a yawning frequency.
 3. The method according to claim 1, wherein the driver distraction state detection comprises: performing at least one of face orientation detection on the driver in the driver image to obtain at least one of face orientation information.
 4. The method according to claim 3, further comprising: determining a parameter value of an index for representing a driver distraction state based on at least one of the face orientation information or the gaze direction information within a period of time, determining a result of the driver distraction state detection based on the determined parameter value; wherein the index for representing the driver distraction state comprises at least one of: a face orientation deviation degree or a gaze deviation degree. wherein the parameter value of the face orientation deviation degree comprises at least one of: a number of head turns, head turning duration, or a head turning frequency; wherein the parameter value of the gaze deviation degree comprises at least one of: a gaze direction deviation angle, gaze direction deviation duration, or a gaze direction deviation frequency.
 5. The method according to claim 3, wherein the face orientation detection comprises: detecting face key points of the driver image; obtaining feature information of head pose based on the face key points; and determining the face orientation information based on the feature information of the head pose.
 6. The method according to claim 5, wherein the obtaining feature information comprise: extracting the feature information of the head pose via a first neural network based on the face key points; and wherein determining the face orientation information based on the feature information of the head pose comprise: performing face orientation estimation via a second neural network based on the feature information of the head pose to obtain the face orientation information.
 7. The method according to claim 1, wherein the determining a pupil edge location based on an eye image positioned by an eye key point among the face key points comprises: detecting, based on a third neural network, a pupil edge location of an eye region image among images divided based on the face key points, and obtaining the pupil edge location based on information outputted by the third neural network.
 8. The method according to claim 1, wherein the driver scheduled distraction action detection comprises: performing a target object detection corresponding to the scheduled distraction action on the driver image to obtain a detection frame for a target object; and determining whether the scheduled distraction action occurs based on the detection frame for the target object.
 9. The method according to claim 8, further comprising: in response to detecting the scheduled distraction action, obtaining a determination result indicating whether the scheduled distraction action occurs within a period of time to obtain a parameter value of an index for representing a distraction degree; and determining the result of the driver scheduled distraction action detection based on the parameter value of the index for representing the distraction degree; wherein the parameter value of the distraction degree comprises at least one of: a number of occurrences of the scheduled distraction action, duration of the scheduled distraction action, or a frequency of the scheduled distraction action.
 10. The method according to claim 1, wherein the driver scheduled distraction action detection further comprises: performing a preset target object detection to obtain a detection frame for a preset target object; the preset target object comprising: hands, mouth, eyes, or a target item; and the target item comprising at least one of following types: containers, foods, or electronic devices; and determining the detection result of the scheduled distraction action based on whether a detection frame for the hands, a detection frame for the mouth, a detection frame for the eyes, or a detection frame for the target item are detected, whether the detection frame for the hands overlaps the detection frame for the target item, a type of the target item, and whether a distance between the detection frame for the target item and the detection frame for the mouth or the detection frame for the eyes satisfies preset conditions.
 11. The method according to claim 9 or claim 10, further comprising: prompting the detected distraction action or outputting distraction prompt information based on at least one of a result of the driver distraction state detection or the result of the driver scheduled distraction action detection, in response to the scheduled distraction action being detected.
 12. The method according to claim 1, wherein the outputting comprises: determining a driving state level according to a preset condition that the result of the driver fatigue state detection, the result of the driver distraction state detection, and the result of the driver scheduled distraction action detection satisfy; and using the determined driving state level as the driving state monitoring result.
 13. The method according to claim 1, further comprising: performing a control operation corresponding to the driving state monitoring result comprising at least one of: in response to determining that the determined driving state monitoring result satisfies a predetermined prompting/warning condition, outputting one or more prompting/warning information corresponding to the predetermined prompting/warning condition; or in response to determining that the determined driving state monitoring result satisfies a predetermined driving mode switching condition, switching a driving mode to an automatic driving mode.
 14. The method according to claim 1, further comprising: performing facial recognition on the driver image; and performing authentication control based on a result of the facial recognition.
 15. The method according to claim 14, wherein the performing facial recognition on the driver image comprises: performing face detection on the driver image via a neural network, and performing feature extraction on the detected face to obtain a face feature; performing face matching between the face feature and face feature templates in a database; and in response to a face feature template matching the face feature existing in the database, outputting identity information corresponding to the face feature template matching the face feature.
 16. The method according to claim 15, further comprising: in response to no face feature template matching the face feature existing in the database, prompting the driver to register; in response to receiving a registration request from the driver, performing face detection on the collected driver image via a neural network, and performing feature extraction on the detected face to obtain a face feature; establishing user information of the driver in the database by using the face feature as the face feature template of the driver, the user information comprising the face feature template of the driver and the identity information inputted by the driver; and storing the driving state monitoring result in the user information of the driver in the database.
 17. The method according to claim 1, further comprising: performing image collection via an infrared camera to obtain the driver image by: performing image collection using the infrared camera deployed in at least one location within a vehicle; wherein the at least one location comprises at least one of the following locations: a location above or near a dashboard, a location above or near a center console, an A-pillar or nearby location, or a rear-view mirror or nearby location.
 18. The method according to claim 1, further comprising: performing driver gesture detection based on the driver image; generating a control instruction based on a result of the driver gesture detection; wherein the performing driver gesture detection based on the driver image comprises: detecting a hand key point in a driver image of a current frame; and using a static gesture determined based on the detected hand key point as the result of the driver gesture detection; or wherein the performing driver gesture detection based on the driver image comprises: detecting hand key points of a plurality of driver image frames in a driver video; and using a dynamic gesture determined based on the detected hand key points of the plurality of driver image frames as the result of the driver gesture detection.
 19. A driving state monitoring apparatus, comprising: a processor; and a memory storing instructions, the instructions when executed by the processor, cause the processor to perform operations, the operations comprising: detecting a driver state on a driver image; and outputting a driving state monitoring result of a driver and/or performing an intelligent driving control based on the detected driver state; wherein the detecting comprises at least one of: driver fatigue state detection, driver distraction state detection, or driver scheduled distraction action detection, wherein, the driver distraction state detection comprises: performing gaze direction detection on the driver in the driver image to obtain gaze direction information, and the gaze direction detection comprises: determining a pupil edge location based on an eye image positioned by an eye key point among face key points, and computing a pupil center location based on the pupil edge location; and computing gaze direction information based on the computed pupil center location and an eye center location.
 20. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor, causes the processor to perform operations, the operations comprising: detecting a driver state on a driver image; and outputting a driving state monitoring result of a driver and/or performing an intelligent driving control based on the detected driver state; wherein the detecting comprises at least one of: driver fatigue state detection, driver distraction state detection, or driver scheduled distraction action detection, wherein, the driver distraction state detection comprises: performing gaze direction detection on the driver in the driver image to obtain gaze direction information, and the gaze direction detection comprises: determining a pupil edge location based on an eye image positioned by an eye key point among face key points, and computing a pupil center location based on the pupil edge location; and computing gaze direction information based on the computed pupil center location and an eye center location. 